projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5ebab74
)
leds: lp3944: Fix return value
author
Sachin Kamat
<sachin.kamat@linaro.org>
Tue, 20 Nov 2012 09:59:02 +0000
(
01:59
-0800)
committer
Bryan Wu
<cooloney@gmail.com>
Mon, 26 Nov 2012 22:43:55 +0000
(14:43 -0800)
Return the value obtained from i2c_smbus_read_byte_data() instead of
-EINVAL. Silences the following smatch warning:
drivers/leds/leds-lp3944.c:89 lp3944_reg_read() info:
why not propagate 'tmp' from i2c_smbus_read_byte_data() instead of -22?
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
drivers/leds/leds-lp3944.c
patch
|
blob
|
history
diff --git
a/drivers/leds/leds-lp3944.c
b/drivers/leds/leds-lp3944.c
index c298f7d9f5357eb27fe302c2a96d906b2ab38b66..b2d82e2d2e9df322ad602700ef1afbd9e732142a 100644
(file)
--- a/
drivers/leds/leds-lp3944.c
+++ b/
drivers/leds/leds-lp3944.c
@@
-86,7
+86,7
@@
static int lp3944_reg_read(struct i2c_client *client, u8 reg, u8 *value)
tmp = i2c_smbus_read_byte_data(client, reg);
if (tmp < 0)
- return
-EINVAL
;
+ return
tmp
;
*value = tmp;