From patchwork Wed Aug 2 22:17:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Franklin Cooper X-Patchwork-Id: 9877811 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 C9FE360390 for ; Wed, 2 Aug 2017 22:19:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BD11828818 for ; Wed, 2 Aug 2017 22:19:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BB86D287C3; Wed, 2 Aug 2017 22:19:42 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE 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 5370E2886E for ; Wed, 2 Aug 2017 22:19:04 +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=2/MOV4d7FrF3eVcaW8y54gfXPJsT1yXCSryj7KBmBj8=; b=Uw/J6PatLLoTYE 2zmpRRrAP6/D3FGHeGEC9Cco+StJSwGUqxoeRP824aidc71OTXPBFJqvNcfjW97Zxss/RyjXr/w9H gxEIdAPbnJl5gbWXOTzkIpPvrN8VzOubtUtpBQhF7HA23srnZlWMamtDF34msM/PJG8Eyuz2/wZXf SqfmwzSzLEW3fCHXqOON6r8APgVy/W/A1de5qSs2oWhIBo1/klgtfl1Q4q1RLdk3iKTczQQYztTan a0MSEM4i8Wwsg0MH9CSNW81l1kyxvg9eU4or4ftitviOg8XoT5JbS+deAtFcgwbCn7+cgMTw+q/0c emMc0R6xCKu1gBZRJDWQ==; 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 1dd1yl-0004kz-5t; Wed, 02 Aug 2017 22:18:59 +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 1dd1yg-0004jt-RD for linux-arm-kernel@lists.infradead.org; Wed, 02 Aug 2017 22:18:56 +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 v72MIPFS018997; Wed, 2 Aug 2017 17:18:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1501712305; bh=EeMIe+WnjMq9pUli6iNiGnotaQJxi1Z1K7U+Yk+4jGQ=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=iNQC8NLS+hzNloMZ7xXb6o3fLJgIdodaSPfzYeggmVrLRcfp5TdY2rb2G7i05rGcM buBsw5d8bn4588RZHivsdl4UO4UPrwhG8tIaZcvTlH+EvYLL44Ssj9e/omm4n/Bany gol4KM+RwLWDn0TxMw6NwsKjJ8/5qh+6iQAtCBb0= Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v72MIPLk013426; Wed, 2 Aug 2017 17:18:25 -0500 Received: from DFLE115.ent.ti.com (10.64.6.36) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34; Wed, 2 Aug 2017 17:18:25 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend Transport; Wed, 2 Aug 2017 17:18:25 -0500 Received: from dbdmail01.india.ti.com (dbdmail01.india.ti.com [172.24.162.206]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id v72MIOGX013814; Wed, 2 Aug 2017 17:18:24 -0500 Received: from uda0273011.dhcp.ti.com (uda0273011.dhcp.ti.com [128.247.59.33]) by dbdmail01.india.ti.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id v72MIGkM017292; Thu, 3 Aug 2017 03:48:20 +0530 From: Franklin S Cooper Jr To: , , , , , , , Subject: [PATCH 1/4] i2c: davinci: Preserve return value of devm_clk_get Date: Wed, 2 Aug 2017 17:17:50 -0500 Message-ID: <20170802221753.13786-2-fcooper@ti.com> X-Mailer: git-send-email 2.9.4.dirty In-Reply-To: <20170802221753.13786-1-fcooper@ti.com> References: <20170802221753.13786-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-20170802_151855_000688_E028FF45 X-CRM114-Status: UNSURE ( 8.96 ) 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. Reviewed-by: Grygorii Strashko Signed-off-by: Franklin S Cooper Jr Signed-off-by: Sekhar Nori Reviewed-by: Grygorii Strashko --- 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 9e7ef5c..5749aac 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);