mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 07:38:10 +00:00
drm/msm: fix NULL-deref on irq uninstall
commitcd459c005d
upstream. In case of early initialisation errors and on platforms that do not use the DPU controller, the deinitilisation code can be called with the kms pointer set to NULL. Fixes:f026e431cf
("drm/msm: Convert to Linux IRQ interfaces") Cc: stable@vger.kernel.org # 5.14 Cc: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/525104/ Link: https://lore.kernel.org/r/20230306100722.28485-5-johan+linaro@kernel.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
8f0e1ad532
commit
e2d1cc82ad
1 changed files with 5 additions and 3 deletions
|
@ -364,9 +364,11 @@ static int msm_drm_uninit(struct device *dev)
|
|||
|
||||
drm_mode_config_cleanup(ddev);
|
||||
|
||||
pm_runtime_get_sync(dev);
|
||||
msm_irq_uninstall(ddev);
|
||||
pm_runtime_put_sync(dev);
|
||||
if (kms) {
|
||||
pm_runtime_get_sync(dev);
|
||||
msm_irq_uninstall(ddev);
|
||||
pm_runtime_put_sync(dev);
|
||||
}
|
||||
|
||||
if (kms && kms->funcs)
|
||||
kms->funcs->destroy(kms);
|
||||
|
|
Loading…
Reference in a new issue