Skip to content

Commit 37a672b

Browse files
Dan Carpenterwsakernel
authored andcommitted
i2c: rcar: fix error code in probe()
Return an error code if devm_reset_control_get_exclusive() fails. The current code returns success. Fixes: 0e864b5 ("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> Signed-off-by: Wolfram Sang <wsa@kernel.org>
1 parent 470a662 commit 37a672b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

drivers/i2c/busses/i2c-rcar.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1153,8 +1153,10 @@ static int rcar_i2c_probe(struct platform_device *pdev)
11531153

11541154
if (priv->devtype == I2C_RCAR_GEN3) {
11551155
priv->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
1156-
if (IS_ERR(priv->rstc))
1156+
if (IS_ERR(priv->rstc)) {
1157+
ret = PTR_ERR(priv->rstc);
11571158
goto out_pm_put;
1159+
}
11581160

11591161
ret = reset_control_status(priv->rstc);
11601162
if (ret < 0)

0 commit comments

Comments
 (0)