summaryrefslogtreecommitdiff
path: root/drivers/power/pmic/pmic_hi6553.c
diff options
context:
space:
mode:
authorJaehoon Chung <jh80.chung@samsung.com>2016-12-15 20:49:50 +0900
committerJaehoon Chung <jh80.chung@samsung.com>2017-01-11 19:40:14 +0900
commit505cf4750ae55e711663538b3ec7a294c08e7417 (patch)
tree43f8c393b19f0946457b1beda94d228b1e6fc6e0 /drivers/power/pmic/pmic_hi6553.c
parent9c720c815b1b1e95fb13153396417dddf323511d (diff)
power: change from meaningless value to error number
'-1' is absolutely meaningless value. This patch changed from meaningless value to error number. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/power/pmic/pmic_hi6553.c')
-rw-r--r--drivers/power/pmic/pmic_hi6553.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/power/pmic/pmic_hi6553.c b/drivers/power/pmic/pmic_hi6553.c
index 0af798753e..b2346b6b4d 100644
--- a/drivers/power/pmic/pmic_hi6553.c
+++ b/drivers/power/pmic/pmic_hi6553.c
@@ -26,7 +26,7 @@ void hi6553_writeb(u32 offset, uint8_t value)
int pmic_reg_write(struct pmic *p, u32 reg, u32 val)
{
if (check_reg(p, reg))
- return -1;
+ return -EINVAL;
hi6553_writeb(reg, (uint8_t)val);
@@ -36,7 +36,7 @@ int pmic_reg_write(struct pmic *p, u32 reg, u32 val)
int pmic_reg_read(struct pmic *p, u32 reg, u32 *val)
{
if (check_reg(p, reg))
- return -1;
+ return -EINVAL;
*val = (u32)hi6553_readb(reg);