mtd: rawnand: vf610: Avoid a potential NULL pointer dereference

of_match_device can return NULL if there is no matching device. Avoid
a potential NULL pointer dereference by checking for the return value
and passing the error upstream.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
This commit is contained in:
Aditya Pakki 2019-03-18 18:24:34 -05:00 • committed by Miquel Raynal
commit 6f0ce4dfc5