* [PATCH AUTOSEL 4.14 3/4] media: atomisp: Fix v4l2_fh resource leak on open errors
[not found] <20221101113135.800983-1-sashal@kernel.org>
@ 2022-11-01 11:31 ` Sasha Levin
0 siblings, 0 replies; only message in thread
From: Sasha Levin @ 2022-11-01 11:31 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Hans de Goede, Andy Shevchenko, Mauro Carvalho Chehab,
Sasha Levin, gregkh, linux-media, linux-staging
From: Hans de Goede <hdegoede@redhat.com>
[ Upstream commit 5b9853ad1329be49343a608d574eb232ff1273d0 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/staging/media/atomisp/pci/atomisp2/atomisp_fops.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_fops.c b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_fops.c
index f1d8cc5a2730..0645751b4b19 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_fops.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_fops.c
@@ -888,6 +888,7 @@ static int atomisp_open(struct file *file)
hmm_pool_unregister(HMM_POOL_TYPE_DYNAMIC);
pm_runtime_put(vdev->v4l2_dev->dev);
rt_mutex_unlock(&isp->mutex);
+ v4l2_fh_release(file);
return ret;
}
--
2.35.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-11-01 11:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20221101113135.800983-1-sashal@kernel.org>
2022-11-01 11:31 ` [PATCH AUTOSEL 4.14 3/4] media: atomisp: Fix v4l2_fh resource leak on open errors Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).