Skip to content

Commit acff9f2

Browse files
elfringAndi Shyti
authored andcommitted
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
1 parent 2e38abe commit acff9f2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/i2c/busses/i2c-designware-platdrv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ static int dw_i2c_plat_probe(struct platform_device *pdev)
239239

240240
ret = i2c_dw_probe_lock_support(dev);
241241
if (ret) {
242-
ret = dev_err_probe(device, ret, "failed to probe lock support\n");
242+
dev_err_probe(device, ret, "failed to probe lock support\n");
243243
goto exit_reset;
244244
}
245245

0 commit comments

Comments
 (0)