aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Goede2022-08-29 12:35:43 +0200
committerMauro Carvalho Chehab2022-09-24 10:00:58 +0200
commit5b9853ad1329be49343a608d574eb232ff1273d0 (patch)
tree9e2275fc95889abb586d048bd2229f15945a047c
parent5a93d0cacf2fe110848200554b2815b2578c679c (diff)
media: atomisp: Fix v4l2_fh resource leak on open errors
When atomisp_open() fails then it must call v4l2_fh_release() to undo the results of v4l2_fh_open(). Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp_fops.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/media/atomisp/pci/atomisp_fops.c b/drivers/staging/media/atomisp/pci/atomisp_fops.c
index 6518e6d5c7b5..61571f3fb060 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_fops.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_fops.c
@@ -804,6 +804,7 @@ css_error:
pm_runtime_put(vdev->v4l2_dev->dev);
error:
rt_mutex_unlock(&isp->mutex);
+ v4l2_fh_release(file);
return ret;
}