parameter: return empty string for unset parameters
Currently we return NULL for unset parameters. As we can't set them back to NULL once set this is not very consistent. Return an empty string instead. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
0c5554919c
commit
8cab6a8733
|
@ -135,7 +135,7 @@ int dev_param_set_generic(struct device_d *dev, struct param_d *p,
|
|||
|
||||
static const char *param_get_generic(struct device_d *dev, struct param_d *p)
|
||||
{
|
||||
return p->value;
|
||||
return p->value ? p->value : "";
|
||||
}
|
||||
|
||||
static struct param_d *__dev_add_param(struct device_d *dev, const char *name,
|
||||
|
|
Loading…
Reference in New Issue