diff options
author | Axel Lin <axel.lin@ingics.com> | 2012-10-07 23:54:23 -0400 |
---|---|---|
committer | Bryan Wu <cooloney@gmail.com> | 2012-11-26 17:28:42 -0500 |
commit | eccb6638569ae80eb4cb198640baac229fde4ff0 (patch) | |
tree | cb81741c1f0f2caa2fb1c587e7b8afd45e32aec2 /drivers | |
parent | 9489e9dcae718d5fde988e4a684a0f55b5f94d17 (diff) |
leds: lm3642: Return proper error in lm3642_[torch|strobe]_pin_store error paths
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: G.Shark Jeong <gshark.jeong@gmail.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/leds/leds-lm3642.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/leds/leds-lm3642.c b/drivers/leds/leds-lm3642.c index 3285006e9888..b69acac6d711 100644 --- a/drivers/leds/leds-lm3642.c +++ b/drivers/leds/leds-lm3642.c | |||
@@ -201,10 +201,10 @@ static ssize_t lm3642_torch_pin_store(struct device *dev, | |||
201 | return size; | 201 | return size; |
202 | out: | 202 | out: |
203 | dev_err(chip->dev, "%s:i2c access fail to register\n", __func__); | 203 | dev_err(chip->dev, "%s:i2c access fail to register\n", __func__); |
204 | return size; | 204 | return ret; |
205 | out_strtoint: | 205 | out_strtoint: |
206 | dev_err(chip->dev, "%s: fail to change str to int\n", __func__); | 206 | dev_err(chip->dev, "%s: fail to change str to int\n", __func__); |
207 | return size; | 207 | return ret; |
208 | } | 208 | } |
209 | 209 | ||
210 | static DEVICE_ATTR(torch_pin, 0666, NULL, lm3642_torch_pin_store); | 210 | static DEVICE_ATTR(torch_pin, 0666, NULL, lm3642_torch_pin_store); |
@@ -258,10 +258,10 @@ static ssize_t lm3642_strobe_pin_store(struct device *dev, | |||
258 | return size; | 258 | return size; |
259 | out: | 259 | out: |
260 | dev_err(chip->dev, "%s:i2c access fail to register\n", __func__); | 260 | dev_err(chip->dev, "%s:i2c access fail to register\n", __func__); |
261 | return size; | 261 | return ret; |
262 | out_strtoint: | 262 | out_strtoint: |
263 | dev_err(chip->dev, "%s: fail to change str to int\n", __func__); | 263 | dev_err(chip->dev, "%s: fail to change str to int\n", __func__); |
264 | return size; | 264 | return ret; |
265 | } | 265 | } |
266 | 266 | ||
267 | static DEVICE_ATTR(strobe_pin, 0666, NULL, lm3642_strobe_pin_store); | 267 | static DEVICE_ATTR(strobe_pin, 0666, NULL, lm3642_strobe_pin_store); |