diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c index ca6d8a867285..98e579ce0d63 100644 --- a/fs/pstore/ram.c +++ b/fs/pstore/ram.c @@ -730,6 +730,7 @@ static int ramoops_probe(struct platform_device *pdev) /* Make sure we didn't get bogus platform data pointer. */ if (!pdata) { pr_err("NULL platform data\n"); + err = -EINVAL; goto fail_out; } @@ -737,6 +738,7 @@ static int ramoops_probe(struct platform_device *pdev) !pdata->ftrace_size && !pdata->pmsg_size)) { pr_err("The memory size and the record/console size must be " "non-zero\n"); + err = -EINVAL; goto fail_out; }