drm: panel-lvds: Potential Oops in probe error handling
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 11 Sep 2019 10:49:28 +0000 (13:49 +0300)
committerSam Ravnborg <sam@ravnborg.org>
Sat, 21 Sep 2019 18:48:09 +0000 (20:48 +0200)
commitfb2ee9bf084bcaeff1e5be100decc0eacb4af2d5
tree75dde1f2f7480883d083003d151d29cec9558aab
parent21185a668787e6673497cb032ecc9ad08c3fcbaf
drm: panel-lvds: Potential Oops in probe error handling

The "lvds->backlight" pointer could be NULL in situations where
of_parse_phandle() returns NULL.  This code is cleaner if we use the
managed devm_of_find_backlight() so the clean up is automatic.

Fixes: 7c9dff5bd643 ("drm: panels: Add LVDS panel driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190911104928.GA15930@mwanda
drivers/gpu/drm/panel/panel-lvds.c