diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c index 013486b5125e..65cbc8a60ca3 100644 --- a/fs/pstore/ram.c +++ b/fs/pstore/ram.c @@ -759,6 +759,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; } @@ -766,6 +767,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; }