soc: amlogic: canvas: Fix meson_canvas_get when probe failed
authorNeil Armstrong <narmstrong@baylibre.com>
Mon, 4 Feb 2019 09:49:37 +0000 (10:49 +0100)
committerKevin Hilman <khilman@baylibre.com>
Fri, 8 Feb 2019 00:31:30 +0000 (16:31 -0800)
commit382f8be04551d60c3e0c4103ce2941c3f335279e
treec17f3860fc982b3fae15a01579be02c7257971fc
parent99e5a8df8b3627239ecef09547931a81618d0851
soc: amlogic: canvas: Fix meson_canvas_get when probe failed

When probe fails, a platforn_device is still associated to the node,
but dev_get_drvdata() returns NULL.

Handle this case by returning a consistent error.

Fixes: d4983983d987 ("soc: amlogic: add meson-canvas driver")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Maxime Jourdan <mjourdan@baylibre.com>
[khilman: fixed minor typo in comment ]
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
drivers/soc/amlogic/meson-canvas.c