summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2017-11-02 13:47:31 +0100
committerWolfram Sang <wsa@the-dreams.de>2017-11-27 18:53:12 +0100
commita4d16493be406273320f152814c33ccdb17dcf91 (patch)
treec43a9a937d7398a5a4a15e801c9ae02ac1cc3e6e /drivers
parent832a522a3ef5e96b517163ee7d4c249545d88626 (diff)
downloadlinux-a4d16493be406273320f152814c33ccdb17dcf91.tar.bz2
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/i2c/busses/i2c-sh_mobile.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c
index 72c9483db769..ebd146ccb244 100644
--- a/drivers/i2c/busses/i2c-sh_mobile.c
+++ b/drivers/i2c/busses/i2c-sh_mobile.c
@@ -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)