summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/console_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/console_common.c b/common/console_common.c
index 2e5869fab0..d051458de4 100644
--- a/common/console_common.c
+++ b/common/console_common.c
@@ -246,7 +246,7 @@ struct console_device *console_get_by_name(const char *name)
struct console_device *cdev;
for_each_console(cdev) {
- if (!strcmp(cdev->devname, name))
+ if (cdev->devname && !strcmp(cdev->devname, name))
return cdev;
}