Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753807AbdHKWBW (ORCPT ); Fri, 11 Aug 2017 18:01:22 -0400 Received: from fllnx210.ext.ti.com ([198.47.19.17]:47360 "EHLO fllnx210.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753713AbdHKWBT (ORCPT ); Fri, 11 Aug 2017 18:01:19 -0400 Subject: Re: [PATCH 1/4] i2c: davinci: Preserve return value of devm_clk_get To: Franklin S Cooper Jr , , , , , , , , References: <20170802221753.13786-1-fcooper@ti.com> <20170802221753.13786-2-fcooper@ti.com> From: Grygorii Strashko Message-ID: <3598274c-4567-eacb-adaa-24c4fd1c1ace@ti.com> Date: Fri, 11 Aug 2017 17:00:35 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170802221753.13786-2-fcooper@ti.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [128.247.59.147] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1323 Lines: 39 On 08/02/2017 05:17 PM, Franklin S Cooper Jr wrote: > 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 I think it's better to drop internal tags. 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); > -- regards, -grygorii