summaryrefslogtreecommitdiffstats
path: root/common/misc.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-08-19 12:25:28 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-08-19 14:50:18 +0200
commit7887781e0faadfa1f71a10c81475543bcfca6b22 (patch)
tree48591f6020858773648b109a68a3ab2d86fc80bd /common/misc.c
parent7e5a875fff7dfe65d7d884dff924fcc25e6cee06 (diff)
downloadbarebox-7887781e0faadfa1f71a10c81475543bcfca6b22.tar.gz
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>
Diffstat (limited to 'common/misc.c')
-rw-r--r--common/misc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/common/misc.c b/common/misc.c
index 66aba53..9b390dc 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);