From 7887781e0faadfa1f71a10c81475543bcfca6b22 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Mon, 19 Aug 2019 12:25:28 +0200 Subject: common: return "none" when board unset Instead of returning NULL when board is not set return "none". Signed-off-by: Sascha Hauer --- common/misc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'common/misc.c') 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); -- cgit v1.2.3