* [PATCH] i2c: rcar: fix error code in probe()
@ 2023-09-27 12:38 Dan Carpenter
2023-09-27 12:53 ` Geert Uytterhoeven
2023-09-27 19:55 ` Wolfram Sang
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2023-09-27 12:38 UTC (permalink / raw)
To: Wolfram Sang
Cc: Andi Shyti, Philipp Zabel, Geert Uytterhoeven, linux-renesas-soc,
linux-i2c, kernel-janitors
Return an error code if devm_reset_control_get_exclusive() fails.
The current code returns success.
Fixes: 0e864b552b23 ("i2c: rcar: reset controller is mandatory for Gen3+")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
drivers/i2c/busses/i2c-rcar.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
index 8417d5bc662b..829ac053bbb7 100644
--- a/drivers/i2c/busses/i2c-rcar.c
+++ b/drivers/i2c/busses/i2c-rcar.c
@@ -1153,8 +1153,10 @@ static int rcar_i2c_probe(struct platform_device *pdev)
if (priv->devtype == I2C_RCAR_GEN3) {
priv->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
- if (IS_ERR(priv->rstc))
+ if (IS_ERR(priv->rstc)) {
+ ret = PTR_ERR(priv->rstc);
goto out_pm_put;
+ }
ret = reset_control_status(priv->rstc);
if (ret < 0)
--
2.39.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] i2c: rcar: fix error code in probe()
2023-09-27 12:38 [PATCH] i2c: rcar: fix error code in probe() Dan Carpenter
@ 2023-09-27 12:53 ` Geert Uytterhoeven
2023-09-27 19:55 ` Wolfram Sang
1 sibling, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2023-09-27 12:53 UTC (permalink / raw)
To: Dan Carpenter
Cc: Wolfram Sang, Andi Shyti, Philipp Zabel, linux-renesas-soc,
linux-i2c, kernel-janitors
On Wed, Sep 27, 2023 at 2:38 PM Dan Carpenter <dan.carpenter@linaro.org> wrote:
> Return an error code if devm_reset_control_get_exclusive() fails.
> The current code returns success.
>
> Fixes: 0e864b552b23 ("i2c: rcar: reset controller is mandatory for Gen3+")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] i2c: rcar: fix error code in probe()
2023-09-27 12:38 [PATCH] i2c: rcar: fix error code in probe() Dan Carpenter
2023-09-27 12:53 ` Geert Uytterhoeven
@ 2023-09-27 19:55 ` Wolfram Sang
1 sibling, 0 replies; 3+ messages in thread
From: Wolfram Sang @ 2023-09-27 19:55 UTC (permalink / raw)
To: Dan Carpenter
Cc: Andi Shyti, Philipp Zabel, Geert Uytterhoeven, linux-renesas-soc,
linux-i2c, kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 345 bytes --]
On Wed, Sep 27, 2023 at 03:38:36PM +0300, Dan Carpenter wrote:
> Return an error code if devm_reset_control_get_exclusive() fails.
> The current code returns success.
>
> Fixes: 0e864b552b23 ("i2c: rcar: reset controller is mandatory for Gen3+")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Applied to for-next, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-09-27 19:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-27 12:38 [PATCH] i2c: rcar: fix error code in probe() Dan Carpenter
2023-09-27 12:53 ` Geert Uytterhoeven
2023-09-27 19:55 ` Wolfram Sang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).