From: Greg Kroah-Hartman Date: Tue, 16 Jul 2024 15:17:02 +0000 (+0200) Subject: 5.10-stable patches X-Git-Tag: v4.19.318~14 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4db4ea753d6294886151b4772a6f8e3396ec38e2;p=thirdparty%2Fkernel%2Fstable-queue.git 5.10-stable patches added patches: i2c-rcar-fix-error-code-in-probe.patch --- diff --git a/queue-5.10/i2c-rcar-fix-error-code-in-probe.patch b/queue-5.10/i2c-rcar-fix-error-code-in-probe.patch new file mode 100644 index 00000000000..ad6a76d2be6 --- /dev/null +++ b/queue-5.10/i2c-rcar-fix-error-code-in-probe.patch @@ -0,0 +1,35 @@ +From 37a672be3ae357a0f87fbc00897fa7fcb3d7d782 Mon Sep 17 00:00:00 2001 +From: Dan Carpenter +Date: Wed, 27 Sep 2023 15:38:36 +0300 +Subject: i2c: rcar: fix error code in probe() + +From: Dan Carpenter + +commit 37a672be3ae357a0f87fbc00897fa7fcb3d7d782 upstream. + +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 +Reviewed-by: Geert Uytterhoeven +Signed-off-by: Wolfram Sang +Signed-off-by: Greg Kroah-Hartman +--- + drivers/i2c/busses/i2c-rcar.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/i2c/busses/i2c-rcar.c ++++ b/drivers/i2c/busses/i2c-rcar.c +@@ -1034,8 +1034,10 @@ static int rcar_i2c_probe(struct platfor + /* R-Car Gen3+ needs a reset before every transfer */ + 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) diff --git a/queue-5.10/series b/queue-5.10/series index 4447382ed51..55ab6c2c033 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -105,3 +105,4 @@ i2c-rcar-reset-controller-is-mandatory-for-gen3.patch i2c-rcar-introduce-gen4-devices.patch i2c-rcar-ensure-gen3-reset-does-not-disturb-local-ta.patch i2c-rcar-clear-no_rxdma-flag-after-resetting.patch +i2c-rcar-fix-error-code-in-probe.patch