aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSundar Raman2014-03-18 15:27:10 -0500
committerSundar Raman2014-03-18 15:59:23 -0500
commitd78c645d1d6549e1168b24a91c031b6b5192fcfb (patch)
treebc5a332f07f575498350b1639adfe331b60eac37
parent0aa59b0d94767ae65625be6afd9ff2cebe334021 (diff)
downloadkernel-video-d78c645d1d6549e1168b24a91c031b6b5192fcfb.tar.gz
kernel-video-d78c645d1d6549e1168b24a91c031b6b5192fcfb.tar.xz
kernel-video-d78c645d1d6549e1168b24a91c031b6b5192fcfb.zip
v4l: ti-vps: vip: Use a more safer api for releasing v4l fh
v4l2_fh_del is not NULL safe and crashes if fh is NULL. Use v4L2_fh_release which checks for NULL and hence more safer. In addition, it also calls v4l2_fh_exit internally and as it is saves an additional invocation in code. Change-Id: I270853d655bc611e35ac886e640860bd965675d4 Signed-off-by: Sundar Raman <sunds@ti.com>
-rw-r--r--drivers/media/platform/ti-vps/vip.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/platform/ti-vps/vip.c b/drivers/media/platform/ti-vps/vip.c
index bab82b10c28..b5e1d3ac316 100644
--- a/drivers/media/platform/ti-vps/vip.c
+++ b/drivers/media/platform/ti-vps/vip.c
@@ -1720,8 +1720,7 @@ int vip_release(struct file *file)
1720 vip_stop_streaming(q); 1720 vip_stop_streaming(q);
1721 vip_release_port(stream->port); 1721 vip_release_port(stream->port);
1722 1722
1723 v4l2_fh_del(&stream->fh); 1723 v4l2_fh_release(&stream->fh);
1724 v4l2_fh_exit(&stream->fh);
1725 vb2_queue_release(q); 1724 vb2_queue_release(q);
1726 1725
1727 dma_addr_global_complete = (dma_addr_t)NULL; 1726 dma_addr_global_complete = (dma_addr_t)NULL;