diff mbox series

[2/2] media: ov2659: fix unbalanced mutex_lock/unlock

Message ID 1553954492-24982-3-git-send-email-akinobu.mita@gmail.com (mailing list archive)
State New, archived
Headers show
Series media: ov2659: two fixes for ov2659 driver | expand

Commit Message

Akinobu Mita March 30, 2019, 2:01 p.m. UTC
Avoid returning with mutex locked.

Fixes: fa8cb6444c32 ("[media] ov2659: Don't depend on subdev API")
Cc: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
---
 drivers/media/i2c/ov2659.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Lad, Prabhakar April 4, 2019, 3:19 p.m. UTC | #1
Hi Akinobu,

Thanks for the patch.

On Sat, Mar 30, 2019 at 2:01 PM Akinobu Mita <akinobu.mita@gmail.com> wrote:
>
> Avoid returning with mutex locked.
>
> Fixes: fa8cb6444c32 ("[media] ov2659: Don't depend on subdev API")
> Cc: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
> Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
> ---
>  drivers/media/i2c/ov2659.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>

Cheers,
--Prabhakar Lad

> diff --git a/drivers/media/i2c/ov2659.c b/drivers/media/i2c/ov2659.c
> index a1e9a98..5ed2413 100644
> --- a/drivers/media/i2c/ov2659.c
> +++ b/drivers/media/i2c/ov2659.c
> @@ -1132,7 +1132,7 @@ static int ov2659_set_fmt(struct v4l2_subdev *sd,
>                 mf = v4l2_subdev_get_try_format(sd, cfg, fmt->pad);
>                 *mf = fmt->format;
>  #else
> -               return -ENOTTY;
> +               ret = -ENOTTY;
>  #endif
>         } else {
>                 s64 val;
> --
> 2.7.4
>
diff mbox series

Patch

diff --git a/drivers/media/i2c/ov2659.c b/drivers/media/i2c/ov2659.c
index a1e9a98..5ed2413 100644
--- a/drivers/media/i2c/ov2659.c
+++ b/drivers/media/i2c/ov2659.c
@@ -1132,7 +1132,7 @@  static int ov2659_set_fmt(struct v4l2_subdev *sd,
 		mf = v4l2_subdev_get_try_format(sd, cfg, fmt->pad);
 		*mf = fmt->format;
 #else
-		return -ENOTTY;
+		ret = -ENOTTY;
 #endif
 	} else {
 		s64 val;