]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/panel: ili9341: fix optional regulator handling
authorDaniel Mack <daniel@zonque.org>
Thu, 17 Mar 2022 22:55:37 +0000 (23:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Apr 2022 18:03:23 +0000 (20:03 +0200)
commite3d982c111a6c033671dd6084b07f62fbf50f76f
treeaad27d6f6bae803772f438743872fe048595e6dc
parentbc47bf7fa58f067ff1d1720719365bac02b31351
drm/panel: ili9341: fix optional regulator handling

commit d14eb80e27795b7b20060f7b151cdfe39722a813 upstream.

If the optional regulator lookup fails, reset the pointer to NULL.
Other functions such as mipi_dbi_poweron_reset_conditional() only do
a NULL pointer check and will otherwise dereference the error pointer.

Fixes: 5a04227326b04c15 ("drm/panel: Add ilitek ili9341 panel driver")
Signed-off-by: Daniel Mack <daniel@zonque.org>
Cc: stable@vger.kernel.org
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20220317225537.826302-1-daniel@zonque.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/panel/panel-ilitek-ili9341.c