Skip to content

Commit

Permalink
leds: lm3642: Return proper error in lm3642_[torch|strobe]_pin_store …
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
Axel Lin authored and Bryan Wu committed Nov 26, 2012
1 parent 9489e9d commit eccb663
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/leds/leds-lm3642.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,10 @@ static ssize_t lm3642_torch_pin_store(struct device *dev,
return size;
out:
dev_err(chip->dev, "%s:i2c access fail to register\n", __func__);
return size;
return ret;
out_strtoint:
dev_err(chip->dev, "%s: fail to change str to int\n", __func__);
return size;
return ret;
}

static DEVICE_ATTR(torch_pin, 0666, NULL, lm3642_torch_pin_store);
Expand Down Expand Up @@ -258,10 +258,10 @@ static ssize_t lm3642_strobe_pin_store(struct device *dev,
return size;
out:
dev_err(chip->dev, "%s:i2c access fail to register\n", __func__);
return size;
return ret;
out_strtoint:
dev_err(chip->dev, "%s: fail to change str to int\n", __func__);
return size;
return ret;
}

static DEVICE_ATTR(strobe_pin, 0666, NULL, lm3642_strobe_pin_store);
Expand Down

0 comments on commit eccb663

Please sign in to comment.