linux/drivers/gpu/drm/meson
Neil Armstrong 7cfc4ea78f drm/meson: fix shutdown crash when component not probed
When main component is not probed, by example when the dw-hdmi module is
not loaded yet or in probe defer, the following crash appears on shutdown:

Unable to handle kernel NULL pointer dereference at virtual address 0000000000000038
...
pc : meson_drv_shutdown+0x24/0x50
lr : platform_drv_shutdown+0x20/0x30
...
Call trace:
meson_drv_shutdown+0x24/0x50
platform_drv_shutdown+0x20/0x30
device_shutdown+0x158/0x360
kernel_restart_prepare+0x38/0x48
kernel_restart+0x18/0x68
__do_sys_reboot+0x224/0x250
__arm64_sys_reboot+0x24/0x30
...

Simply check if the priv struct has been allocated before using it.

Fixes: fa0c16caf3 ("drm: meson_drv add shutdown function")
Reported-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210430082744.3638743-1-narmstrong@baylibre.com
2021-05-25 09:22:27 +02:00
..
Kconfig Merge remote-tracking branch 'drm/drm-next' into drm-misc-next 2019-05-28 09:39:08 +02:00
Makefile drm/meson: Add AFBCD module driver 2019-12-10 10:09:01 +01:00
meson_crtc.c drm/atomic: Pass the full state to CRTC atomic begin and flush 2020-11-02 12:37:49 +01:00
meson_crtc.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
meson_drv.c drm/meson: fix shutdown crash when component not probed 2021-05-25 09:22:27 +02:00
meson_drv.h drm/meson: overlay: setup overlay for Amlogic FBC 2020-07-03 10:12:29 +02:00
meson_dw_hdmi.c drm/meson: dw-hdmi: Enable the iahb clock early enough 2020-11-20 16:41:10 +01:00
meson_dw_hdmi.h drm: meson: global clean-up 2019-08-09 12:06:14 +02:00
meson_osd_afbcd.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
meson_osd_afbcd.h drm/meson: Add AFBCD module driver 2019-12-10 10:09:01 +01:00
meson_overlay.c drm: Use state helper instead of the plane state pointer 2021-02-25 08:05:28 +01:00
meson_overlay.h drm/meson: Support Overlay plane for video rendering 2018-11-13 13:27:51 +01:00
meson_plane.c drm: Use state helper instead of the plane state pointer 2021-02-25 08:05:28 +01:00
meson_plane.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
meson_rdma.c drm: meson: fix address type confusion 2020-01-08 13:51:56 +01:00
meson_rdma.h drm/meson: add RDMA module driver 2019-12-10 10:08:45 +01:00
meson_registers.h Linux 5.8-rc6 2020-07-24 08:48:05 +10:00
meson_vclk.c drm/meson/meson_vclk: Make two local functions static 2020-11-17 18:34:14 +01:00
meson_vclk.h drm/meson: add mode selection limits against specific SoC revisions 2020-05-05 10:19:33 +02:00
meson_venc.c drm/meson: Fix few typo 2021-03-19 10:40:54 +01:00
meson_venc.h drm/meson: venc: add support for YUV420 setup 2020-03-10 10:51:24 +01:00
meson_venc_cvbs.c drm: Nuke mode->vrefresh 2020-05-27 14:31:42 +03:00
meson_venc_cvbs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
meson_viu.c drm/meson: viu: fix setting the OSD burst length in VIU_OSD1_FIFO_CTRL_STAT 2020-07-02 10:36:56 +02:00
meson_viu.h drm/meson: viu: add AFBC modules routing functions 2019-12-10 10:09:38 +01:00
meson_vpp.c drm: meson: use match data to detect vpu compatibility 2019-08-22 17:54:05 +02:00
meson_vpp.h drm/meson: drop use of drmP.h 2019-07-17 12:47:57 +02:00