From 0130e3bfa9fa102252ad318d0f5608cc09822baa Mon Sep 17 00:00:00 2001 From: Wolfram Sang Date: Wed, 16 Jan 2019 22:05:53 +0100 Subject: [PATCH] i2c: sh_mobile: replace break; with if-block In preparation to remove the do-while-loop. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang --- 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.45.2