From patchwork Tue Jul 26 14:49:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9248263 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 456A7607D8 for ; Tue, 26 Jul 2016 14:49:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3726C20951 for ; Tue, 26 Jul 2016 14:49:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2B359209CD; Tue, 26 Jul 2016 14:49:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C33562094D for ; Tue, 26 Jul 2016 14:49:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754485AbcGZOtp (ORCPT ); Tue, 26 Jul 2016 10:49:45 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:33748 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756549AbcGZOto (ORCPT ); Tue, 26 Jul 2016 10:49:44 -0400 Received: by mail-pf0-f193.google.com with SMTP id i6so115804pfe.0 for ; Tue, 26 Jul 2016 07:49:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=QJ53xIzUh+GEmv9BXS+c+uaNZmB5Gx+BtG0G6qV1Uf0=; b=QmqfMURiNPVV0DkMfEc/Xd/rDoRHCQQ/8m3qYO5ICUFdPuyZx06wFAQLvzw0NbyPhy K6lHDd6WFtTDHpDtzstgx85OC0Wm8yBv+3GFHphzfslwC4ztzuulicid/vFND2dibvQa 8GzKpgcxeaczEMpwR4lHEVEjFGFdrFnrixq7OLc1gGNzF7VIXZRwEEVHbx5SCfD48CA/ TCj+0kH+IhqeIDNDvl6pXvevWLG4K3Wvbu5DEyVczYoKSQHrkQfcvglOYMA8oKIzQ9mD VRuh1exFm5KlcPLFFXLnZW1fAKRZlKqrd6oeUdU2hl9beSIWA4efMkA0Wrzlibc+brBk 56pA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=QJ53xIzUh+GEmv9BXS+c+uaNZmB5Gx+BtG0G6qV1Uf0=; b=b63ueSPHMCQBUBvtGD/BfHZfNyieitvv8aqSX8Ag200YmsXVIbeSrQbTZEzypR3MFA H8NvcGZCdfCQr2BNqRdw/TFbXidXUkAOIG3OG9eXqYCau4dx02vbNb6Bc23V0yA7TeJH p7fRIIpIbtadZ4jZvQorOM1KdpmOgthV0G3BFjKMc2j0Lpj9QnykjmBwwB84DNuz25Um Nuxz9CIHz/+iM70seJvtw6RRIT1oYzQ1MhLBBJVx3UD1vRe1uiukvbBVizM/hVJMVUrX 5xDoHAJFht+JUCoSAmVFBzVD2ytvU7mPbOOjQDcPFwC+K+RDOb0H70R1lLmqQaY+QhqM 33+g== X-Gm-Message-State: AEkoouszEZ3lAfM9lvZdwkXnrDo+9cih8AA42TL+SOjg+ALvtFVTM+lRPyeDf0tCobprvQ== X-Received: by 10.98.97.7 with SMTP id v7mr40041560pfb.49.1469544583802; Tue, 26 Jul 2016 07:49:43 -0700 (PDT) Received: from localhost.localdomain.localdomain (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id e187sm2247373pfg.43.2016.07.26.07.49.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Jul 2016 07:49:43 -0700 (PDT) From: Wei Yongjun To: Sebastian Reichel , Dmitry Eremin-Solenikov , David Woodhouse Cc: Wei Yongjun , linux-pm@vger.kernel.org Subject: [PATCH] power_supply: tps65217-charger: fix missing platform_set_drvdata() Date: Tue, 26 Jul 2016 14:49:04 +0000 Message-Id: <1469544544-31749-1-git-send-email-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add missing platform_set_drvdata() in tps65217_charger_probe(), otherwise calling platform_get_drvdata() in remove returns NULL. This is detected by Coccinelle semantic patch. Signed-off-by: Wei Yongjun --- drivers/power/tps65217_charger.c | 1 + 1 file changed, 1 insertion(+) -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/power/tps65217_charger.c b/drivers/power/tps65217_charger.c index 73dfae4..4c56e54 100644 --- a/drivers/power/tps65217_charger.c +++ b/drivers/power/tps65217_charger.c @@ -206,6 +206,7 @@ static int tps65217_charger_probe(struct platform_device *pdev) if (!charger) return -ENOMEM; + platform_set_drvdata(pdev, charger); charger->tps = tps; charger->dev = &pdev->dev;