[U-Boot] [PATCH] dfu:fix: Replace wrong return value with proper one

Lukasz Majewski l.majewski at samsung.com
Thu Apr 24 10:24:53 CEST 2014


This patch remove always false (since we tested ret = 0) ternary operator
with ret value returned.

Signed-off-by: Lukasz Majewski <l.majewski at samsung.com>
---
 drivers/dfu/dfu.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dfu/dfu.c b/drivers/dfu/dfu.c
index a41195b..422cdba 100644
--- a/drivers/dfu/dfu.c
+++ b/drivers/dfu/dfu.c
@@ -238,7 +238,7 @@ int dfu_write(struct dfu_entity *dfu, void *buf, int size, int blk_seq_num)
 			ret = tret;
 	}
 
-	return ret = 0 ? size : ret;
+	return ret;
 }
 
 static int dfu_read_buffer_fill(struct dfu_entity *dfu, void *buf, int size)
-- 
1.7.10.4



More information about the U-Boot mailing list