diff options
-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) | |||
181 | * TODO: In the long run all drivers that use v4l2_device should use the | 181 | * TODO: In the long run all drivers that use v4l2_device should use the |
182 | * v4l2_device release callback. This check will then be unnecessary. | 182 | * v4l2_device release callback. This check will then be unnecessary. |
183 | */ | 183 | */ |
184 | if (v4l2_dev->release == NULL) | 184 | if (v4l2_dev && v4l2_dev->release == NULL) |
185 | v4l2_dev = NULL; | 185 | v4l2_dev = NULL; |
186 | 186 | ||
187 | /* Release video_device and perform other | 187 | /* Release video_device and perform other |