aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx231xx/cx231xx-video.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/cx231xx/cx231xx-video.c')
-rw-r--r--drivers/media/video/cx231xx/cx231xx-video.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/media/video/cx231xx/cx231xx-video.c b/drivers/media/video/cx231xx/cx231xx-video.c
index 829a41b0c9ef..7f916f0685e9 100644
--- a/drivers/media/video/cx231xx/cx231xx-video.c
+++ b/drivers/media/video/cx231xx/cx231xx-video.c
@@ -2319,8 +2319,7 @@ static int cx231xx_v4l2_close(struct file *filp)
2319 if (dev->state & DEV_DISCONNECTED) { 2319 if (dev->state & DEV_DISCONNECTED) {
2320 if (atomic_read(&dev->devlist_count) > 0) { 2320 if (atomic_read(&dev->devlist_count) > 0) {
2321 cx231xx_release_resources(dev); 2321 cx231xx_release_resources(dev);
2322 kfree(dev); 2322 fh->dev = NULL;
2323 dev = NULL;
2324 return 0; 2323 return 0;
2325 } 2324 }
2326 return 0; 2325 return 0;
@@ -2350,8 +2349,7 @@ static int cx231xx_v4l2_close(struct file *filp)
2350 free the remaining resources */ 2349 free the remaining resources */
2351 if (dev->state & DEV_DISCONNECTED) { 2350 if (dev->state & DEV_DISCONNECTED) {
2352 cx231xx_release_resources(dev); 2351 cx231xx_release_resources(dev);
2353 kfree(dev); 2352 fh->dev = NULL;
2354 dev = NULL;
2355 return 0; 2353 return 0;
2356 } 2354 }
2357 2355