summaryrefslogtreecommitdiff
path: root/kernel/printk/printk.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/printk/printk.c')
-rw-r--r--kernel/printk/printk.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index c5b568c2d167..a14f15ad0f35 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -1049,7 +1049,12 @@ static void __init log_buf_len_update(unsigned size)
/* save requested log_buf_len since it's too early to process it */
static int __init log_buf_len_setup(char *str)
{
- unsigned size = memparse(str, &str);
+ unsigned int size;
+
+ if (!str)
+ return -EINVAL;
+
+ size = memparse(str, &str);
log_buf_len_update(size);