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.de
pull/1354/merge
Markus Elfring 2025-10-20 12:56:39 +02:00 committed by Andi Shyti
parent 2e38abef12
commit acff9f2666
1 changed files with 1 additions and 1 deletions

View File

@ -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;
} }