i2c: designware: Omit a variable reassignment in dw_i2c_plat_probe()
An error code was assigned to a variable and checked accordingly. This value was passed to a dev_err_probe() call in an if branch. This function is documented in the way that the same value is returned. Thus delete a redundant variable reassignment. The source code was transformed by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Reviewed-by: Anand Moon <linux.amoon@gmail.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org> Link: https://lore.kernel.org/r/bec52694-c755-4d88-aa36-1d96f6d146e4@web.depull/1354/merge
parent
2e38abef12
commit
acff9f2666
|
|
@ -239,7 +239,7 @@ static int dw_i2c_plat_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
ret = i2c_dw_probe_lock_support(dev);
|
ret = i2c_dw_probe_lock_support(dev);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
ret = dev_err_probe(device, ret, "failed to probe lock support\n");
|
dev_err_probe(device, ret, "failed to probe lock support\n");
|
||||||
goto exit_reset;
|
goto exit_reset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue