summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/hwconfig.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/common/hwconfig.c b/common/hwconfig.c
index 3c9759fc557..da8d3edb071 100644
--- a/common/hwconfig.c
+++ b/common/hwconfig.c
@@ -68,8 +68,8 @@ next:
return NULL;
}
-const char *cpu_hwconfig __attribute__((weak));
-const char *board_hwconfig __attribute__((weak));
+const char cpu_hwconfig[] __attribute__((weak)) = "";
+const char board_hwconfig[] __attribute__((weak)) = "";
#define HWCONFIG_PRE_RELOC_BUF_SIZE 128
@@ -96,13 +96,11 @@ static const char *__hwconfig(const char *opt, size_t *arglen)
return hwconfig_parse(env_hwconfig, strlen(env_hwconfig),
opt, ";", ':', arglen);
- if (board_hwconfig)
- return hwconfig_parse(board_hwconfig, strlen(board_hwconfig),
- opt, ";", ':', arglen);
+ return hwconfig_parse(board_hwconfig, strlen(board_hwconfig),
+ opt, ";", ':', arglen);
- if (cpu_hwconfig)
- return hwconfig_parse(cpu_hwconfig, strlen(cpu_hwconfig),
- opt, ";", ':', arglen);
+ return hwconfig_parse(cpu_hwconfig, strlen(cpu_hwconfig),
+ opt, ";", ':', arglen);
return NULL;
}