From: Laurent Pinchart Date: Mon, 4 Nov 2013 09:52:10 +0000 (-0300) Subject: upstream: [media] v4l: omap3isp: Don't check for missing get_fmt op on remote subdev X-Git-Tag: submit/tizen/20141121.110247~801 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=162e44d7b552978bc2235974b7de223c0af8bdf3;p=platform%2Fkernel%2Flinux-3.10.git upstream: [media] v4l: omap3isp: Don't check for missing get_fmt op on remote subdev The remote subdev of any video node in the OMAP3 ISP is an internal subdev that is guaranteed to implement get_fmt. Don't check the return value for -ENOIOCTLCMD, as this can't happen. While at it, move non-critical code out of the mutex-protected section. Signed-off-by: Laurent Pinchart Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/omap3isp/ispvideo.c b/drivers/media/platform/omap3isp/ispvideo.c index f118799..f95ef44 100644 --- a/drivers/media/platform/omap3isp/ispvideo.c +++ b/drivers/media/platform/omap3isp/ispvideo.c @@ -290,14 +290,11 @@ __isp_video_get_format(struct isp_video *video, struct v4l2_format *format) if (subdev == NULL) return -EINVAL; - mutex_lock(&video->mutex); - fmt.pad = pad; fmt.which = V4L2_SUBDEV_FORMAT_ACTIVE; - ret = v4l2_subdev_call(subdev, pad, get_fmt, NULL, &fmt); - if (ret == -ENOIOCTLCMD) - ret = -EINVAL; + mutex_lock(&video->mutex); + ret = v4l2_subdev_call(subdev, pad, get_fmt, NULL, &fmt); mutex_unlock(&video->mutex); if (ret)