This is a note to let you know that I've just added the patch titled media: atomisp: Fix v4l2_fh resource leak on open errors to the 4.14-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: media-atomisp-fix-v4l2_fh-resource-leak-on-open-erro.patch and it can be found in the queue-4.14 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit ea45a7d2bef8e255762a0bcaba8b6bfc0a4bd328 Author: Hans de Goede <hdegoede@xxxxxxxxxx> Date: Mon Aug 29 12:35:43 2022 +0200 media: atomisp: Fix v4l2_fh resource leak on open errors [ 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@xxxxxxxxx> Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx> Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> 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; }