Skip to content

Commit 0abbf0a

Browse files
Dan Carpenterwsakernel
authored andcommitted
i2c: sun6i-p2wi: Fix an error message in probe()
The "ret" variable is uninitialized. It was the "p2wi->rstc" variable that was intended. We can also use the %pe string format to print the error code name instead of just the number. Fixes: 75ff8a3 ("i2c: sun6i-p2wi: Use devm_clk_get_enabled()") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Andi Shyti <andi.shyti@kernel.org> Signed-off-by: Wolfram Sang <wsa@kernel.org>
1 parent fff67c1 commit 0abbf0a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/i2c/busses/i2c-sun6i-p2wi.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,8 @@ static int p2wi_probe(struct platform_device *pdev)
250250

251251
p2wi->rstc = devm_reset_control_get_exclusive(dev, NULL);
252252
if (IS_ERR(p2wi->rstc)) {
253-
dev_err(dev, "failed to retrieve reset controller: %d\n", ret);
253+
dev_err(dev, "failed to retrieve reset controller: %pe\n",
254+
p2wi->rstc);
254255
return PTR_ERR(p2wi->rstc);
255256
}
256257

0 commit comments

Comments
 (0)