From: Andy Shevchenko Date: Wed, 25 Sep 2024 12:44:20 +0000 (+0300) Subject: i2c: designware: Get rid of redundant 'else' X-Git-Tag: v6.13-rc1~124^2^2~26 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dd05a76e694027998c8a7a568c44e67cf0bfe04e;p=thirdparty%2Fkernel%2Flinux.git i2c: designware: Get rid of redundant 'else' In the snippets like the following if (...) return / goto / break / continue ...; else ... the 'else' is redundant. Get rid of it. Reviewed-by: Andi Shyti Reviewed-by: Mario Limonciello Signed-off-by: Andy Shevchenko Acked-by: Jarkko Nikula Tested-by: Serge Semin Signed-off-by: Andi Shyti --- diff --git a/drivers/i2c/busses/i2c-designware-common.c b/drivers/i2c/busses/i2c-designware-common.c index 9d88b4fa03e42..f9889861357d5 100644 --- a/drivers/i2c/busses/i2c-designware-common.c +++ b/drivers/i2c/busses/i2c-designware-common.c @@ -678,10 +678,10 @@ int i2c_dw_handle_tx_abort(struct dw_i2c_dev *dev) if (abort_source & DW_IC_TX_ARB_LOST) return -EAGAIN; - else if (abort_source & DW_IC_TX_ABRT_GCALL_READ) + if (abort_source & DW_IC_TX_ABRT_GCALL_READ) return -EINVAL; /* wrong msgs[] data */ - else - return -EIO; + + return -EIO; } int i2c_dw_set_fifo_size(struct dw_i2c_dev *dev)