[PATCH 2/2] state: don't use uninitialized variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Printing 'ret' makes no sense.

Signed-off-by: Juergen Borleis <jbe@xxxxxxxxxxxxxx>
---
 common/state/backend_storage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/state/backend_storage.c b/common/state/backend_storage.c
index 825db824b..c6ebe8624 100644
--- a/common/state/backend_storage.c
+++ b/common/state/backend_storage.c
@@ -214,7 +214,7 @@ static int mtd_get_meminfo(const char *path, struct mtd_info_user *meminfo)
 
 	fd = open(path, O_RDONLY);
 	if (fd < 0) {
-		pr_err("Failed to open '%s', %d\n", path, ret);
+		pr_err("Failed to open '%s', %d\n", path, fd);
 		return fd;
 	}
 
-- 
2.11.0


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux