]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: amphion: Set video drvdata before register video device
authorMing Qian <ming.qian@nxp.com>
Fri, 13 Sep 2024 06:21:45 +0000 (15:21 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Dec 2024 09:40:57 +0000 (10:40 +0100)
commit182b9edc02c4cbb6fe6b97105c23c7047a3340d2
tree0dd6c5f119843fcb25af38810f6d4439617ba75c
parentc98586d8d01c9e860e7acc3807c2afeb1dc14e8a
media: amphion: Set video drvdata before register video device

commit 8cbb1a7bd5973b57898b26eb804fe44af440bb63 upstream.

The video drvdata should be set before the video device is registered,
otherwise video_drvdata() may return NULL in the open() file ops, and led
to oops.

Fixes: 3cd084519c6f ("media: amphion: add vpu v4l2 m2m support")
Cc: <stable@vger.kernel.org>
Signed-off-by: Ming Qian <ming.qian@nxp.com>
Reviewed-by: TaoJiang <tao.jiang_2@nxp.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/platform/amphion/vpu_v4l2.c