浏览代码

ds2782_battery: Fix ds2782_get_capacity return value

The ds2782_get_capacity function should return 0 on success, not the
capacity value.

Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
Ryan Mallon 15 年之前
父节点
当前提交
2d31757c87
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/power/ds2782_battery.c

+ 1 - 1
drivers/power/ds2782_battery.c

@@ -163,7 +163,7 @@ static int ds2782_get_capacity(struct ds278x_info *info, int *capacity)
 	if (err)
 		return err;
 	*capacity = raw;
-	return raw;
+	return 0;
 }
 
 static int ds2786_get_current(struct ds278x_info *info, int *current_uA)