Skip to content

Commit dd05a76

Browse files
andy-shevAndi Shyti
authored andcommitted
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 <andi.shyti@kernel.org> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Tested-by: Serge Semin <fancer.lancer@gmail.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
1 parent d2f94dc commit dd05a76

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -678,10 +678,10 @@ int i2c_dw_handle_tx_abort(struct dw_i2c_dev *dev)
678678

679679
if (abort_source & DW_IC_TX_ARB_LOST)
680680
return -EAGAIN;
681-
else if (abort_source & DW_IC_TX_ABRT_GCALL_READ)
681+
if (abort_source & DW_IC_TX_ABRT_GCALL_READ)
682682
return -EINVAL; /* wrong msgs[] data */
683-
else
684-
return -EIO;
683+
684+
return -EIO;
685685
}
686686

687687
int i2c_dw_set_fifo_size(struct dw_i2c_dev *dev)

0 commit comments

Comments
 (0)