提交 eccb6638 编写于 作者: A Axel Lin 提交者: Bryan Wu

leds: lm3642: Return proper error in lm3642_[torch|strobe]_pin_store error paths

Signed-off-by: NAxel Lin <axel.lin@ingics.com>
Acked-by: NG.Shark Jeong <gshark.jeong@gmail.com>
Signed-off-by: NBryan Wu <cooloney@gmail.com>
上级 9489e9dc
......@@ -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);
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册