[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221101112726.799368-18-sashal@kernel.org>
Date: Tue, 1 Nov 2022 07:27:10 -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 6.0 18/34] 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 77150e4ae144..92cbc0e263e8 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_fops.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_fops.c
@@ -903,6 +903,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;
}
--
2.35.1
Powered by blists - more mailing lists