@@ -1098,7 +1098,7 @@ static const struct vb2_ops mcam_vb2_sg_ops = {
#endif /* MCAM_MODE_DMA_SG */
-static int mcam_setup_vb2(struct mcam_camera *cam)
+static void mcam_setup_vb2(struct mcam_camera *cam)
{
struct vb2_queue *vq = &cam->vb_queue;
@@ -1139,7 +1139,7 @@ static int mcam_setup_vb2(struct mcam_camera *cam)
#endif
break;
}
- return vb2_queue_init(vq);
+ vb2_queue_init(vq);
}
static void mcam_cleanup_vb2(struct mcam_camera *cam)
@@ -1548,15 +1548,12 @@ static int mcam_v4l_open(struct file *filp)
frames = singles = delivered = 0;
mutex_lock(&cam->s_mutex);
if (cam->users == 0) {
- ret = mcam_setup_vb2(cam);
- if (ret)
- goto out;
+ mcam_setup_vb2(cam);
mcam_ctlr_power_up(cam);
__mcam_cam_reset(cam);
mcam_set_config_needed(cam, 1);
}
(cam->users)++;
-out:
mutex_unlock(&cam->s_mutex);
return ret;
}
Right now vb2_queue_init() returns always 0 and it will be changed to return void. Cc: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com> --- drivers/media/platform/marvell-ccic/mcam-core.c | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-)