i2c: sh_mobile: shorten exit of xfer routine
We can use the ternary operator for easier reading. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
This commit is contained in:
parent
832a522a3e
commit
a4d16493be
|
@ -746,9 +746,7 @@ static int sh_mobile_i2c_xfer(struct i2c_adapter *adapter,
|
|||
clk_disable_unprepare(pd->clk);
|
||||
pm_runtime_put_sync(pd->dev);
|
||||
|
||||
if (!err)
|
||||
err = num;
|
||||
return err;
|
||||
return err ?: num;
|
||||
}
|
||||
|
||||
static u32 sh_mobile_i2c_func(struct i2c_adapter *adapter)
|
||||
|
|
Loading…
Reference in New Issue