瀏覽代碼

[media] hdpvr: Added some error handling in hdpvr_start_streaming()

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>
Leonid Kegulskiy 12 年之前
父節點
當前提交
f743687690
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      drivers/media/usb/hdpvr/hdpvr-video.c

+ 5 - 1
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;