From patchwork Tue Jul 26 14:48:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9248261 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 9A8B5607D8 for ; Tue, 26 Jul 2016 14:48:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8C32F2094D for ; Tue, 26 Jul 2016 14:48:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 80F2C272AA; Tue, 26 Jul 2016 14:48:53 +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 29CD72094D for ; Tue, 26 Jul 2016 14:48:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754485AbcGZOsv (ORCPT ); Tue, 26 Jul 2016 10:48:51 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:36709 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752435AbcGZOsu (ORCPT ); Tue, 26 Jul 2016 10:48:50 -0400 Received: by mail-pf0-f196.google.com with SMTP id y134so108991pfg.3; Tue, 26 Jul 2016 07:48:50 -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=pb5X9SoxqAf/etvjSXek8VOzhI10s7xHGufdf/oFktA=; b=ZbCyzsZ95wPsppUxCt7YDR31J1MPhCQ8EGrxqzN14gRozwTE6YasX5/wK9zKaMhIw4 5Bfe3ZTs6gOQWEStv6tn3kIOlsoMuTdOyoA2T5E+cQkN6XzIGvdD5hV/a1GcUcW0Lg69 aKvd1FO1vYZWh9auD0E86nsAN2Fl+YoLQR8gFdkHiDVRRuCKvl58/ATuo2QOo93AYuSd XMP3a8EcvqDNlA4G3fU/B0kQyUwaNrULBCMV+ttCUEcSzaVIgerXGBjWgiLrf4GAfpSX 9Y7Z2qy3Ghl9TlJdNH5l5VvLGK3hih9cezJkt57lBigowfKH4BLaYgrTnsVL75PJx8dV +vMg== 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=pb5X9SoxqAf/etvjSXek8VOzhI10s7xHGufdf/oFktA=; b=RXW8o4e2Zhc/dYLKzC/ZhO7fWGPgBDAQm5+Rv7p6QbF+PoYgc2jzHGQ+gHSsuujobC P/l4gqLCvU9f01+T0yssA4+Z8RnP551g1st/4Eebceij/iK/nIA7Sds8X0m9F0M3UAp8 y+kku19tSOQ8sjNQsY3d7OVR/ciwTS9bMXZQZSzO7My7Jd5byORLzrTk0q3Kq1oe60w5 zm5TQsAjZGw715S+LSVGqTFe1vlz53bNlz9StKu1/OztNGfm1ZkXeANSzo5cijD1yjh/ VKN50AmAE32WD9CKbeqRgBWNkobNU25hbHtWkD7Qqo1YZr8A8BVusbT2rkFyjurvymY1 kUWQ== X-Gm-Message-State: AEkooutODDleFhTB5PTjDUyMN8tV2PLq16W2zuwIg0wqjKTREdHlwqnUb0/wdWldVBq5cA== X-Received: by 10.98.68.148 with SMTP id m20mr36207829pfi.0.1469544529635; Tue, 26 Jul 2016 07:48:49 -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 u1sm2296964pfu.12.2016.07.26.07.48.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Jul 2016 07:48:49 -0700 (PDT) From: Wei Yongjun To: Felipe Balbi , Greg Kroah-Hartman Cc: Wei Yongjun , linux-usb@vger.kernel.org, linux-omap@vger.kernel.org Subject: [PATCH] usb: phy: omap-otg: Fix missing platform_set_drvdata() in omap_otg_probe() Date: Tue, 26 Jul 2016 14:48:39 +0000 Message-Id: <1469544519-31666-1-git-send-email-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add missing platform_set_drvdata() in omap_otg_probe(), otherwise calling platform_get_drvdata() in remove returns NULL. This is detected by Coccinelle semantic patch. Signed-off-by: Wei Yongjun --- drivers/usb/phy/phy-omap-otg.c | 2 ++ 1 file changed, 2 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-omap" 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/usb/phy/phy-omap-otg.c b/drivers/usb/phy/phy-omap-otg.c index 6f6d2a7..6523af4 100644 --- a/drivers/usb/phy/phy-omap-otg.c +++ b/drivers/usb/phy/phy-omap-otg.c @@ -140,6 +140,8 @@ static int omap_otg_probe(struct platform_device *pdev) (rev >> 4) & 0xf, rev & 0xf, config->extcon, otg_dev->id, otg_dev->vbus); + platform_set_drvdata(pdev, otg_dev); + return 0; }