]> git.baikalelectronics.ru Git - kernel.git/commit
drm/panel: check failure cases in the probe func
authorNavid Emamdoost <navid.emamdoost@gmail.com>
Wed, 24 Jul 2019 19:55:34 +0000 (14:55 -0500)
committerSam Ravnborg <sam@ravnborg.org>
Fri, 26 Jul 2019 11:44:42 +0000 (13:44 +0200)
commit7ff6a3b4d3523168a7f4a4630cb3179c202a57c9
tree3e880341bb28cd472a992a8ae6b26648c4ee5c2d
parentfdf1cb40bcb178e0dd875ecf6feb9c833bd949bf
drm/panel: check failure cases in the probe func

The following function calls may fail and return NULL, so the null check
is added.
of_graph_get_next_endpoint
of_graph_get_remote_port_parent
of_graph_get_remote_port

Update: Thanks to Sam Ravnborg, for suggession on the use of goto to avoid
leaking endpoint.

Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190724195534.9303-1-navid.emamdoost@gmail.com
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c