diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2019-08-19 12:25:28 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-08-19 14:50:18 +0200 |
commit | 7887781e0faadfa1f71a10c81475543bcfca6b22 (patch) | |
tree | 48591f6020858773648b109a68a3ab2d86fc80bd | |
parent | 7e5a875fff7dfe65d7d884dff924fcc25e6cee06 (diff) | |
download | barebox-7887781e0faadfa1f71a10c81475543bcfca6b22.tar.gz barebox-7887781e0faadfa1f71a10c81475543bcfca6b22.tar.xz |
common: return "none" when board unset
Instead of returning NULL when board is not set return "none".
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | common/misc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/common/misc.c b/common/misc.c index 66aba534fc..9b390dc7ba 100644 --- a/common/misc.c +++ b/common/misc.c @@ -150,7 +150,10 @@ EXPORT_SYMBOL(barebox_set_model); const char *barebox_get_model(void) { - return model; + if (model) + return model; + else + return "none"; } EXPORT_SYMBOL(barebox_get_model); |