]> git.hungrycats.org Git - linux/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)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Sat, 12 Oct 2024 14:28:25 +0000 (16:28 +0200)
commit8cbb1a7bd5973b57898b26eb804fe44af440bb63
treef8e28f753a04f26249c32516680023fa168d1b3c
parentd2b7ecc26bd5406d5ba927be1748aa99c568696c
media: amphion: Set video drvdata before register video device

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>
drivers/media/platform/amphion/vpu_v4l2.c