Skip to content

Commit e4fcd69

Browse files
committed
Merge branch 'v4l_for_linus' of git://linuxtv.org/mchehab/for_linus
* 'v4l_for_linus' of git://linuxtv.org/mchehab/for_linus: [media] videodev: fix a NULL pointer dereference in v4l2_device_release()
2 parents f91f6cf + e58fced commit e4fcd69

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/media/video/v4l2-dev.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ static void v4l2_device_release(struct device *cd)
181181
* TODO: In the long run all drivers that use v4l2_device should use the
182182
* v4l2_device release callback. This check will then be unnecessary.
183183
*/
184-
if (v4l2_dev->release == NULL)
184+
if (v4l2_dev && v4l2_dev->release == NULL)
185185
v4l2_dev = NULL;
186186

187187
/* Release video_device and perform other

0 commit comments

Comments
 (0)