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>
This commit is contained in:
Hans de Goede
2022-08-29 12:35:43 +02:00
committed by Mauro Carvalho Chehab
parent 5a93d0cacf
commit 5b9853ad13

View File

@@ -804,6 +804,7 @@ static int atomisp_open(struct file *file)
pm_runtime_put(vdev->v4l2_dev->dev);
error:
rt_mutex_unlock(&isp->mutex);
v4l2_fh_release(file);
return ret;
}