]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[media] hdpvr: Added some error handling in hdpvr_start_streaming()
authorLeonid Kegulskiy <leo@lumanate.com>
Thu, 25 Apr 2013 08:59:56 +0000 (05:59 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 21 May 2013 11:20:24 +0000 (08:20 -0300)
Signed-off-by: Leonid Kegulskiy <leo@lumanate.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/usb/hdpvr/hdpvr-video.c

index 774ba0e820beaee594eadb6f99d9d79a17d75a37..cd90ba81a5bbb734f85ef37f29ef895de53f4124 100644 (file)
@@ -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;