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>
diff --git a/drivers/power/axp209.c b/drivers/power/axp209.c
index 731b75e..4b25ef2 100644
--- a/drivers/power/axp209.c
+++ b/drivers/power/axp209.c
@@ -158,7 +158,7 @@
ver &= 0x0f;
if (ver != 0x1)
- return -1;
+ return -EINVAL;
/* Mask all interrupts */
for (i = AXP209_IRQ_ENABLE1; i <= AXP209_IRQ_ENABLE5; i++) {