From: Leonid Kegulskiy Date: Thu, 25 Apr 2013 08:59:56 +0000 (-0300) Subject: upstream: [media] hdpvr: Added some error handling in hdpvr_start_streaming() X-Git-Tag: submit/tizen/20141121.110247~2325 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f441ee0b71a5d7c27319dee427f001b2f059b75e;p=platform%2Fkernel%2Flinux-3.10.git upstream: [media] hdpvr: Added some error handling in hdpvr_start_streaming() Signed-off-by: Leonid Kegulskiy Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/usb/hdpvr/hdpvr-video.c b/drivers/media/usb/hdpvr/hdpvr-video.c index eed70a4..d7799c0 100644 --- a/drivers/media/usb/hdpvr/hdpvr-video.c +++ b/drivers/media/usb/hdpvr/hdpvr-video.c @@ -298,8 +298,12 @@ static int hdpvr_start_streaming(struct hdpvr_device *dev) 0xb8, 0x38, 0x1, 0, NULL, 0, 8000); v4l2_dbg(MSG_BUFFER, hdpvr_debug, &dev->v4l2_dev, "encoder start control request returned %d\n", ret); + if (ret < 0) + return ret; - hdpvr_config_call(dev, CTRL_START_STREAMING_VALUE, 0x00); + ret = hdpvr_config_call(dev, CTRL_START_STREAMING_VALUE, 0x00); + if (ret) + return ret; dev->status = STATUS_STREAMING;