nv: Use dev_remove_param to delete nv variable
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@pengutronix.de>
This commit is contained in:
parent
0c2fccceb6
commit
75926bc33d
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue