diff mbox series

[1/7] media: atomisp: Fix missing v4l2_fh_release() in atomisp_open() error exit

Message ID 20230619105212.303653-1-hdegoede@redhat.com (mailing list archive)
State New, archived
Headers show
Series [1/7] media: atomisp: Fix missing v4l2_fh_release() in atomisp_open() error exit | expand

Commit Message

Hans de Goede June 19, 2023, 10:52 a.m. UTC
Fix missing v4l2_fh_release() in atomisp_open()'s
"if (pipe->users)" error exit path.

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202306180511.XWN0Hr7F-lkp@intel.com/
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/staging/media/atomisp/pci/atomisp_fops.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Andy Shevchenko June 19, 2023, 11:12 a.m. UTC | #1
On Mon, Jun 19, 2023 at 12:52:06PM +0200, Hans de Goede wrote:
> Fix missing v4l2_fh_release() in atomisp_open()'s
> "if (pipe->users)" error exit path.

All LGTM,
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Hans de Goede June 21, 2023, 7:09 p.m. UTC | #2
Hi Andy,

On 6/19/23 13:12, Andy Shevchenko wrote:
> On Mon, Jun 19, 2023 at 12:52:06PM +0200, Hans de Goede wrote:
>> Fix missing v4l2_fh_release() in atomisp_open()'s
>> "if (pipe->users)" error exit path.
> 
> All LGTM,
> Reviewed-by: Andy Shevchenko <andy@kernel.org>

As always thank you for all the reviews.

I've fixed up the ioctl-s -> IOCTLs remark in
the commit message of 6/7 while merging this.

And I've merged this entire series into my media-atomisp
branch now:

https://git.kernel.org/pub/scm/linux/kernel/git/hansg/linux.git/log/?h=media-atomisp

Regards,

Hans
diff mbox series

Patch

diff --git a/drivers/staging/media/atomisp/pci/atomisp_fops.c b/drivers/staging/media/atomisp/pci/atomisp_fops.c
index 54466d2f323a..a09087dccbcb 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_fops.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_fops.c
@@ -513,8 +513,8 @@  static int atomisp_open(struct file *file)
 	 */
 	if (pipe->users) {
 		dev_dbg(isp->dev, "video node already opened\n");
-		mutex_unlock(&isp->mutex);
-		return -EBUSY;
+		ret = -EBUSY;
+		goto error;
 	}
 
 	/* runtime power management, turn on ISP */