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:
Wolfram Sang 2017-11-02 13:47:31 +01:00 committed by Wolfram Sang
parent 832a522a3e
commit a4d16493be
1 changed files with 1 additions and 3 deletions

View File

@ -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)