globalvar: call dev_set_param only once when loading nv vars
PATCH 1/1 globalvar: call dev_set_param only once when loading nv vars
globalvar_add_simple() accepts NULL as value to mean that a global variable should be created, but dev_set_param() should not yet be called.
Instead we pass a non-NULL value, so dev_set_param() is called once when adding the variable and once more directly after via nv_set().
Fix this, so dev_set_param() is called only once.
Signed-off-by Ahmad Fatoum <[email protected]>
--- common/globalvar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
common/globalvar.c +1 -1
@@ -236,11 +236,11 @@ static int __nvvar_add(const char *name, const char *value)if (IS_ERR (p))return PTR_ERR (p); }/* Create corresponding globalvar if it doesn't exist yet */ - ret =globalvar_add_simple (name, value); + ret =globalvar_add_simple (name,NULL );if (ret && ret != -EEXIST )return ret;if (value)return nv_set (p, name, value);
Signature · 1 line
2.47.3