[U-Boot] [PATCH] power_i2c.c: Fix unused variable warning

Tom Rini trini at konsulko.com
Wed Jan 11 15:17:31 CET 2017


The variable ret was added but never set as we did not make calls to
other functions that we needed to check the return value on.

Fixes: 505cf4750ae5 ("power: change from meaningless value to error number")
Signed-off-by: Tom Rini <trini at konsulko.com>
---
 drivers/power/power_i2c.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/power/power_i2c.c b/drivers/power/power_i2c.c
index dd22ece53cd2..8a8ea10e33ef 100644
--- a/drivers/power/power_i2c.c
+++ b/drivers/power/power_i2c.c
@@ -19,7 +19,6 @@
 int pmic_reg_write(struct pmic *p, u32 reg, u32 val)
 {
 	unsigned char buf[4] = { 0 };
-	int ret;
 
 	if (check_reg(p, reg))
 		return -EINVAL;
-- 
1.9.1



More information about the U-Boot mailing list