diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-19 06:44:11 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-19 06:44:11 -0700 |
commit | e4fcd69c9e4e273352e0f87cabd9648606da0c3e (patch) | |
tree | cf245bbc06077702a4380cf1d34dbcd0443e4a63 | |
parent | f91f6cfd4f9ea794dc3d0bbd54cb1d29d6ef3843 (diff) | |
parent | e58fced201ad6e6cb673f07499919c3b20792d94 (diff) |
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()
-rw-r--r-- | drivers/media/video/v4l2-dev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/v4l2-dev.c b/drivers/media/video/v4l2-dev.c index d72156517726..a5c9ed128b97 100644 --- a/drivers/media/video/v4l2-dev.c +++ b/drivers/media/video/v4l2-dev.c @@ -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 |