[PATCH 1/2] parameter: allow setting of string parameters of zero length

Marc Kleine-Budde mkl at pengutronix.de
Mon Jun 15 06:44:46 PDT 2015


Signed-off-by: Marc Kleine-Budde <mkl at pengutronix.de>
---
 lib/parameter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/parameter.c b/lib/parameter.c
index 865ad9f4316f..09559b637ee3 100644
--- a/lib/parameter.c
+++ b/lib/parameter.c
@@ -225,7 +225,7 @@ static int param_string_set(struct device_d *dev, struct param_d *p, const char
 	char *value_save = *ps->value;
 
 	if (!val)
-		return -EINVAL;
+		val = "";
 
 	*ps->value = xstrdup(val);
 
-- 
2.1.4




More information about the barebox mailing list