From patchwork Wed Aug 16 22:17:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Franklin Cooper X-Patchwork-Id: 9904663 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 1588A600CA for ; Wed, 16 Aug 2017 22:20:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 073F3289AF for ; Wed, 16 Aug 2017 22:20:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EFCF728A60; Wed, 16 Aug 2017 22:20:20 +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=-2.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3818528A47 for ; Wed, 16 Aug 2017 22:20:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=oUZ3usCrUE9LH3Ey0+NB19X68P+xVNM+d8MFrNSZ+EY=; b=GYbaJ4O3yzQ6ZT KpXAgHqJPIHhzlAhB6nwq0+gy8LEp34InVrtc1vu0YM1BGFZTbVK+1PvU8nLsKg37bywBbvlL/yIt oSvaibmOuZxljraAv69TAE5I5wxXeqwQH55ZAXe/iN2aWsXIGn42XVrJqx7nGFTceqRAvRCnUlPXV G1qBjj1yj/xI1YB0FKpeQ2/RWFlMdtsCuFdf66vxk+ZXFHEBIYe+jNad5XsK1lMeDlmZd+kbISn7r p6dgts9RPtObO3XxKKeaxFNv/oZT86JFYJIvVHqSczbigfpgm1Wh7zXbmXZjJo3l7L1LdbL5MlSie mRfo1GoKYGibqzU9ojFA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1di6fS-0004At-Sc; Wed, 16 Aug 2017 22:20:02 +0000 Received: from lelnx193.ext.ti.com ([198.47.27.77]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1di6fP-00044M-IV for linux-arm-kernel@lists.infradead.org; Wed, 16 Aug 2017 22:20:01 +0000 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id v7GMHUQ7019044; Wed, 16 Aug 2017 17:17:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1502921850; bh=8EPW5OM4ErppqaDCRUx2jnbtEXq/jtSkNQXercq/w2g=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=rOxBE7cRiYrmu/w8eaj5LGpNFDg/1OzmpUmbO/09CFKTBU96Yj0MOgMcDTuO94KH3 Fq2jCurDJe1U0aTg9CNvSMCw7pP9TSMghRS59dNg1SP90i7w29c4vg8Zv2MWdddYt7 dSD/OtUEfeph/XCUtXK+oyjPILT1AmPiF9mMtU3U= Received: from DFLE104.ent.ti.com (dfle104.ent.ti.com [10.64.6.25]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v7GMHUn5025952; Wed, 16 Aug 2017 17:17:30 -0500 Received: from DFLE112.ent.ti.com (10.64.6.33) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34; Wed, 16 Aug 2017 17:17:30 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend Transport; Wed, 16 Aug 2017 17:17:30 -0500 Received: from dbdmail01.india.ti.com (dbdmail01.india.ti.com [172.24.162.206]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v7GMHSqO023444; Wed, 16 Aug 2017 17:17:29 -0500 Received: from uda0273011.dhcp.ti.com (uda0273011.dhcp.ti.com [128.247.59.135]) by dbdmail01.india.ti.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id v7GMHKkM028296; Thu, 17 Aug 2017 03:47:25 +0530 From: Franklin S Cooper Jr To: , , , , , , , , , Subject: [PATCH v2 1/3] i2c: davinci: Preserve return value of devm_clk_get Date: Wed, 16 Aug 2017 17:17:13 -0500 Message-ID: <20170816221715.15027-2-fcooper@ti.com> X-Mailer: git-send-email 2.9.4.dirty In-Reply-To: <20170816221715.15027-1-fcooper@ti.com> References: <20170816221715.15027-1-fcooper@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170816_151959_734014_87A4D253 X-CRM114-Status: UNSURE ( 8.87 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Franklin S Cooper Jr Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The i2c driver can run into driver dependency issues if its loaded before a clock driver it depends on. Therefore, EPROBE_DEFER may be returned by devm_clk_get and should be returned in probe to allow the kernel to reprobe the driver at a later time. This patch allows the error value returned by devm_clk_get to be passed through and not overwritten. Signed-off-by: Franklin S Cooper Jr Reviewed-by: Grygorii Strashko Acked-by: Sekhar Nori --- drivers/i2c/busses/i2c-davinci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c index 33ca9a3..b8c4353 100644 --- a/drivers/i2c/busses/i2c-davinci.c +++ b/drivers/i2c/busses/i2c-davinci.c @@ -801,7 +801,7 @@ static int davinci_i2c_probe(struct platform_device *pdev) dev->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(dev->clk)) - return -ENODEV; + return PTR_ERR(dev->clk); clk_prepare_enable(dev->clk); mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);