media: ov2659: fix unbalanced mutex_lock/unlock
authorAkinobu Mita <akinobu.mita@gmail.com>
Sat, 30 Mar 2019 14:01:32 +0000 (10:01 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 22 Apr 2019 15:35:11 +0000 (11:35 -0400)
Avoid returning with mutex locked.

Fixes: fa8cb6444c32 ("[media] ov2659: Don't depend on subdev API")

Cc: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/i2c/ov2659.c

index a1e9a98..5ed2413 100644 (file)
@@ -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;