[PATCH 5/6] nv: Use dev_remove_param to delete nv variable

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

 



dev_remove_param() is exactly for the purpose of removing a device
parameter, so use this function instead of open coding the
functionality.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 common/globalvar.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/common/globalvar.c b/common/globalvar.c
index 4110a06..a2eaaa0 100644
--- a/common/globalvar.c
+++ b/common/globalvar.c
@@ -304,13 +304,12 @@ int nvvar_remove(const char *name)
 		return -ENOENT;
 
 	fname = basprintf("/env/nv/%s", p->name);
+
+	dev_remove_param(p);
+
 	unlink(fname);
 	free(fname);
 
-	list_del(&p->list);
-	free(p->name);
-	free(p);
-
 	return 0;
 }
 
-- 
2.8.1


_______________________________________________
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