[RFC/RFT 5/7] i2c: sh_mobile: replace break; with if-block

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In preparation to remove the do-while-loop.

Signed-off-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
---
 drivers/i2c/busses/i2c-sh_mobile.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c
index ef9101cde29f..ab6969ed7eff 100644
--- a/drivers/i2c/busses/i2c-sh_mobile.c
+++ b/drivers/i2c/busses/i2c-sh_mobile.c
@@ -394,11 +394,10 @@ static int sh_mobile_i2c_isr_rx(struct sh_mobile_i2c_data *pd)
 				break;
 			}
 
-			if (real_pos < 0) {
+			if (real_pos < 0)
 				i2c_op(pd, OP_RX_STOP);
-				break;
-			}
-			data = i2c_op(pd, OP_RX_STOP_DATA);
+			else
+				data = i2c_op(pd, OP_RX_STOP_DATA);
 		} else if (real_pos >= 0) {
 			data = i2c_op(pd, OP_RX);
 		}
-- 
2.11.0




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux