9
0
Fork 0

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:
Sascha Hauer 2012-04-29 19:06:48 +02:00
parent 0c5554919c
commit 8cab6a8733
1 changed files with 1 additions and 1 deletions

View File

@ -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,