aboutsummaryrefslogtreecommitdiff
path: root/core/flash.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/flash.c')
-rw-r--r--core/flash.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/flash.c b/core/flash.c
index 6d6e354..065fde2 100644
--- a/core/flash.c
+++ b/core/flash.c
@@ -428,9 +428,13 @@ int flash_register(struct blocklevel_device *bl)
if (rc)
return rc;
+ if (!name)
+ name = "(unnamed)";
+
prlog(PR_INFO, "FLASH: registering flash device %s "
"(size 0x%llx, blocksize 0x%x)\n",
- name ?: "(unnamed)", size, block_size);
+ name, size, block_size);
+
flash = malloc(sizeof(struct flash));
if (!flash) {
prlog(PR_ERR, "FLASH: Error allocating flash structure\n");