Message ID | 20170816221715.15027-2-fcooper@ti.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thursday 17 August 2017 03:47 AM, 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. > > Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> > Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com> Acked-by: Sekhar Nori <nsekhar@ti.com> Thanks, Sekhar
On Wed, Aug 16, 2017 at 05:17:13PM -0500, 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. > > Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> > Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com> Applied to for-next, thanks! Waiting for V3 of the other patches.
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);