diff options
author | Praneeth Bajjuri | 2017-02-06 08:47:30 -0600 |
---|---|---|
committer | Praneeth Bajjuri | 2017-02-06 08:47:30 -0600 |
commit | 4985466551dcd663e986825d0e2a207e79231640 (patch) | |
tree | dc9d95f2a22b3f6c09c12699b7d1998be7197d57 | |
parent | 67b5d1b474f58b19e0336349115660e767e8dcde (diff) | |
parent | 27d6c62416796592e6eca644771e4b659f38ca7a (diff) | |
download | kernel-omap-4985466551dcd663e986825d0e2a207e79231640.tar.gz kernel-omap-4985466551dcd663e986825d0e2a207e79231640.tar.xz kernel-omap-4985466551dcd663e986825d0e2a207e79231640.zip |
Merge branch 'p-ti-lsk-linux-4.4.y-next' into p-ti-lsk-android-linux-4.4.yp-ti-lsk-android-linux-4.4.y
* p-ti-lsk-linux-4.4.y-next:
media: vip: Fail open if the subdev is not ready
Change-Id: I5f680705a4cf6ee4b13be06003a8e4db89ac9351
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
-rw-r--r-- | drivers/media/platform/ti-vpe/vip.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/media/platform/ti-vpe/vip.c b/drivers/media/platform/ti-vpe/vip.c index 4fd828eaeee7..50d461f53f79 100644 --- a/drivers/media/platform/ti-vpe/vip.c +++ b/drivers/media/platform/ti-vpe/vip.c | |||
@@ -2700,9 +2700,11 @@ static int vip_init_port(struct vip_port *port) | |||
2700 | sd_fmt.which = V4L2_SUBDEV_FORMAT_ACTIVE; | 2700 | sd_fmt.which = V4L2_SUBDEV_FORMAT_ACTIVE; |
2701 | sd_fmt.pad = 0; | 2701 | sd_fmt.pad = 0; |
2702 | ret = v4l2_subdev_call(port->subdev, pad, get_fmt, NULL, &sd_fmt); | 2702 | ret = v4l2_subdev_call(port->subdev, pad, get_fmt, NULL, &sd_fmt); |
2703 | if (ret) | 2703 | if (ret) { |
2704 | vip_dbg(1, dev, "init_port get_fmt failed in subdev: (%d)\n", | 2704 | vip_dbg(1, dev, "init_port get_fmt failed in subdev: (%d)\n", |
2705 | ret); | 2705 | ret); |
2706 | return ret; | ||
2707 | } | ||
2706 | 2708 | ||
2707 | /* try to find one that matches */ | 2709 | /* try to find one that matches */ |
2708 | fmt = find_port_format_by_code(port, mbus_fmt->code); | 2710 | fmt = find_port_format_by_code(port, mbus_fmt->code); |
@@ -3094,8 +3096,10 @@ static int vip_open(struct file *file) | |||
3094 | if (!v4l2_fh_is_singular_file(file)) | 3096 | if (!v4l2_fh_is_singular_file(file)) |
3095 | goto unlock; | 3097 | goto unlock; |
3096 | 3098 | ||
3097 | if (vip_init_stream(stream)) | 3099 | if (vip_init_stream(stream)) { |
3100 | v4l2_fh_release(file); | ||
3098 | ret = -ENODEV; | 3101 | ret = -ENODEV; |
3102 | } | ||
3099 | unlock: | 3103 | unlock: |
3100 | mutex_unlock(&dev->mutex); | 3104 | mutex_unlock(&dev->mutex); |
3101 | return ret; | 3105 | return ret; |