Skip to content

Commit

Permalink
Merge branch 'v4l_for_linus' of git://linuxtv.org/mchehab/for_linus
Browse files Browse the repository at this point in the history
* 'v4l_for_linus' of git://linuxtv.org/mchehab/for_linus:
  [media] videodev: fix a NULL pointer dereference in v4l2_device_release()
  • Loading branch information
Linus Torvalds committed Oct 19, 2011
2 parents f91f6cf + e58fced commit e4fcd69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/video/v4l2-dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ static void v4l2_device_release(struct device *cd)
* TODO: In the long run all drivers that use v4l2_device should use the
* v4l2_device release callback. This check will then be unnecessary.
*/
if (v4l2_dev->release == NULL)
if (v4l2_dev && v4l2_dev->release == NULL)
v4l2_dev = NULL;

/* Release video_device and perform other
Expand Down

0 comments on commit e4fcd69

Please sign in to comment.