diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2024-09-25 14:44:20 +0200 |
---|---|---|
committer | Andi Shyti <andi.shyti@kernel.org> | 2024-11-13 23:29:47 +0100 |
commit | dd05a76e694027998c8a7a568c44e67cf0bfe04e (patch) | |
tree | cbde9596507ea53ffe6245672a9ce6e0fa62a0cd /drivers/i2c/busses/i2c-designware-common.c | |
parent | i2c: designware: Use temporary variable for struct device (diff) | |
download | linux-dd05a76e694027998c8a7a568c44e67cf0bfe04e.tar.xz linux-dd05a76e694027998c8a7a568c44e67cf0bfe04e.zip |
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>
Diffstat (limited to 'drivers/i2c/busses/i2c-designware-common.c')
-rw-r--r-- | drivers/i2c/busses/i2c-designware-common.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-designware-common.c b/drivers/i2c/busses/i2c-designware-common.c index 9d88b4fa03e4..f9889861357d 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) |