diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2012-12-02 22:50:47 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-12-21 14:22:30 -0200 |
commit | e276f03b4f29fcc54d8e658d5de8dd953e4aef1e (patch) | |
tree | d341ec9fc1a25fafabd77845f3a6d32de0b12805 /drivers/media/platform/davinci/vpbe_display.c | |
parent | 4d22f1086d24f61e271e1e84c0c27db4ad495e8f (diff) | |
download | talos-obmc-linux-e276f03b4f29fcc54d8e658d5de8dd953e4aef1e.tar.gz talos-obmc-linux-e276f03b4f29fcc54d8e658d5de8dd953e4aef1e.zip |
[media] media: davinci: vpbe: return error code on error in vpbe_display_g_crop()
We have assigned error code to 'ret' if crop->type is not
V4L2_BUF_TYPE_VIDEO_OUTPUT, but never use it.
We'd better return the error code on this error.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Prabhakar Lad <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/platform/davinci/vpbe_display.c')
-rw-r--r-- | drivers/media/platform/davinci/vpbe_display.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/platform/davinci/vpbe_display.c b/drivers/media/platform/davinci/vpbe_display.c index 0723c4694ced..d078738b35d6 100644 --- a/drivers/media/platform/davinci/vpbe_display.c +++ b/drivers/media/platform/davinci/vpbe_display.c @@ -791,7 +791,6 @@ static int vpbe_display_g_crop(struct file *file, void *priv, struct vpbe_device *vpbe_dev = fh->disp_dev->vpbe_dev; struct osd_state *osd_device = fh->disp_dev->osd_device; struct v4l2_rect *rect = &crop->c; - int ret; v4l2_dbg(1, debug, &vpbe_dev->v4l2_dev, "VIDIOC_G_CROP, layer id = %d\n", @@ -799,7 +798,7 @@ static int vpbe_display_g_crop(struct file *file, void *priv, if (crop->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) { v4l2_err(&vpbe_dev->v4l2_dev, "Invalid buf type\n"); - ret = -EINVAL; + return -EINVAL; } osd_device->ops.get_layer_config(osd_device, layer->layer_info.id, cfg); |