Message ID | 20180524203520.1598-20-ezequiel@collabora.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c index ee1eec136e55..834e3de69992 100644 --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c @@ -2694,12 +2694,11 @@ static struct mutex *v4l2_ioctl_get_lock(struct video_device *vdev, struct v4l2_m2m_queue_ctx *ctx = is_output ? &vfh->m2m_ctx->out_q_ctx : &vfh->m2m_ctx->cap_q_ctx; - if (ctx->q.lock) - return ctx->q.lock; + return ctx->q.lock; } #endif - if (vdev->queue && vdev->queue->lock && - (v4l2_ioctls[_IOC_NR(cmd)].flags & INFO_FL_QUEUE)) + if (vdev->queue && + (v4l2_ioctls[_IOC_NR(cmd)].flags & INFO_FL_QUEUE)) return vdev->queue->lock; return vdev->lock; }