[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221101112919.799868-12-sashal@kernel.org>
Date: Tue, 1 Nov 2022 07:29:12 -0400
From: Sasha Levin <sashal@...nel.org>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc: Hans de Goede <hdegoede@...hat.com>,
Andy Shevchenko <andriy.shevchenko@...el.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Sasha Levin <sashal@...nel.org>, gregkh@...uxfoundation.org,
andriy.shevchenko@...ux.intel.com, kitakar@...il.com,
alan@...ux.intel.com, linux-media@...r.kernel.org,
linux-staging@...ts.linux.dev
Subject: [PATCH AUTOSEL 5.15 12/19] media: atomisp: Fix v4l2_fh resource leak on open errors
From: Hans de Goede <hdegoede@...hat.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@...el.com>
Signed-off-by: Hans de Goede <hdegoede@...hat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@...nel.org>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/staging/media/atomisp/pci/atomisp_fops.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/media/atomisp/pci/atomisp_fops.c b/drivers/staging/media/atomisp/pci/atomisp_fops.c
index 18fff47bd25d..cb61ffb7d3b2 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_fops.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_fops.c
@@ -890,6 +890,7 @@ static int atomisp_open(struct file *file)
error:
hmm_pool_unregister(HMM_POOL_TYPE_DYNAMIC);
rt_mutex_unlock(&isp->mutex);
+ v4l2_fh_release(file);
return ret;
}
--
2.35.1
Powered by blists - more mailing lists