FROMLIST: pstore-ram: fix NULL reference when used with pdata
authorBrian Norris <briannorris@google.com>
Mon, 14 Mar 2016 20:34:44 +0000 (13:34 -0700)
committerAmit Pundir <amit.pundir@linaro.org>
Thu, 7 Apr 2016 11:19:59 +0000 (16:49 +0530)
commit772d83a92971662b11316a2a266730d18c1bdeda
tree72df46cbd6b7f4308d82b9f5ff0781ba9a1f8d52
parent3e04d6dfbce9bd89f0c5c79123670397d8ca9370
FROMLIST: pstore-ram: fix NULL reference when used with pdata

When using platform-data (not DT), we get an OOPS, because drvdata is
only initialized after we try to use it.

This addresses my comments made on the upstream submission here:

https://patchwork.kernel.org/patch/7980651/

Fixes boot on Chrome OS systems, including the Pixel 2.

Change-Id: I97360edf2ce61c83dc543cb6c169f3287e2dae4b
Fixes: b1d1b7187c11 ("FROMLIST: pstore-ram: add Device Tree bindings")
Signed-off-by: Brian Norris <briannorris@google.com>
fs/pstore/ram.c