projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
832a522
)
i2c: sh_mobile: shorten exit of xfer routine
author
Wolfram Sang
<wsa+renesas@sang-engineering.com>
Thu, 2 Nov 2017 12:47:31 +0000
(13:47 +0100)
committer
Wolfram Sang
<wsa@the-dreams.de>
Mon, 27 Nov 2017 17:53:12 +0000
(18:53 +0100)
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>
drivers/i2c/busses/i2c-sh_mobile.c
patch
|
blob
|
history
diff --git
a/drivers/i2c/busses/i2c-sh_mobile.c
b/drivers/i2c/busses/i2c-sh_mobile.c
index
72c9483
..
ebd146c
100644
(file)
--- 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)