This is a note to let you know that I've just added the patch titled media: cedrus: Set the platform driver data earlier to the 5.19-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: media-cedrus-set-the-platform-driver-data-earlier.patch and it can be found in the queue-5.19 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 708938f8495147fe2e77a9a3e1015d8e6899323e Mon Sep 17 00:00:00 2001 From: Dmitry Osipenko <dmitry.osipenko@xxxxxxxxxxxxx> Date: Thu, 18 Aug 2022 22:33:07 +0200 Subject: media: cedrus: Set the platform driver data earlier From: Dmitry Osipenko <dmitry.osipenko@xxxxxxxxxxxxx> commit 708938f8495147fe2e77a9a3e1015d8e6899323e upstream. The cedrus_hw_resume() crashes with NULL deference on driver probe if runtime PM is disabled because it uses platform data that hasn't been set up yet. Fix this by setting the platform data earlier during probe. Cc: stable@xxxxxxxxxxxxxxx Fixes: 50e761516f2b (media: platform: Add Cedrus VPU decoder driver) Signed-off-by: Dmitry Osipenko <dmitry.osipenko@xxxxxxxxxxxxx> Signed-off-by: Nicolas Dufresne <nicolas.dufresne@xxxxxxxxxxxxx> Reviewed-by: Samuel Holland <samuel@xxxxxxxxxxxx> Acked-by: Paul Kocialkowski <paul.kocialkowski@xxxxxxxxxxx> Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx> Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/staging/media/sunxi/cedrus/cedrus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/staging/media/sunxi/cedrus/cedrus.c +++ b/drivers/staging/media/sunxi/cedrus/cedrus.c @@ -422,6 +422,8 @@ static int cedrus_probe(struct platform_ if (!dev) return -ENOMEM; + platform_set_drvdata(pdev, dev); + dev->vfd = cedrus_video_device; dev->dev = &pdev->dev; dev->pdev = pdev; @@ -495,8 +497,6 @@ static int cedrus_probe(struct platform_ goto err_m2m_mc; } - platform_set_drvdata(pdev, dev); - return 0; err_m2m_mc: Patches currently in stable-queue which might be from dmitry.osipenko@xxxxxxxxxxxxx are queue-5.19/drm-virtio-unlock-reservations-on-dma_resv_reserve_fences-error.patch queue-5.19/media-cedrus-set-the-platform-driver-data-earlier.patch queue-5.19/drm-virtio-check-whether-transferred-2d-bo-is-shmem.patch queue-5.19/media-cedrus-fix-endless-loop-in-cedrus_h265_skip_bits.patch queue-5.19/drm-virtio-unlock-reservations-on-virtio_gpu_object_shmem_init-error.patch queue-5.19/drm-virtio-use-appropriate-atomic-state-in-virtio_gpu_plane_cleanup_fb.patch