Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1713387
| From | Franklin S Cooper Jr <fcooper@ti.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 1/3] i2c: davinci: Preserve return value of devm_clk_get |
| Date | 2017-08-17 00:30 +0200 |
| Message-ID | <ufeZ5-4rP-33@gated-at.bofh.it> (permalink) |
| References | <ufeZ4-4rP-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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> --- 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); -- 2.9.4.dirty
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 0/3] ARM: dts: keystone-k2g: Add I2C support for 66AK2G Franklin S Cooper Jr <fcooper@ti.com> - 2017-08-17 00:30 +0200
[PATCH v2 2/3] i2c: davinci: Add PM Runtime Support Franklin S Cooper Jr <fcooper@ti.com> - 2017-08-17 00:30 +0200
Re: [PATCH v2 2/3] i2c: davinci: Add PM Runtime Support Wolfram Sang <wsa@the-dreams.de> - 2017-08-17 18:30 +0200
Re: [PATCH v2 2/3] i2c: davinci: Add PM Runtime Support Sekhar Nori <nsekhar@ti.com> - 2017-08-21 11:20 +0200
Re: [PATCH v2 2/3] i2c: davinci: Add PM Runtime Support Sekhar Nori <nsekhar@ti.com> - 2017-08-21 11:10 +0200
Re: [PATCH v2 2/3] i2c: davinci: Add PM Runtime Support Franklin S Cooper Jr <fcooper@ti.com> - 2017-08-22 03:30 +0200
Re: [PATCH v2 2/3] i2c: davinci: Add PM Runtime Support Sekhar Nori <nsekhar@ti.com> - 2017-08-22 07:30 +0200
[PATCH v2 1/3] i2c: davinci: Preserve return value of devm_clk_get Franklin S Cooper Jr <fcooper@ti.com> - 2017-08-17 00:30 +0200
Re: [PATCH v2 1/3] i2c: davinci: Preserve return value of devm_clk_get Sekhar Nori <nsekhar@ti.com> - 2017-08-21 11:50 +0200
csiph-web