瀏覽代碼

V4L/DVB (10629): tvp514x: try_count reaches 0, not -1

with while (try_count-- > 0) { ... } try_count reaches 0, not -1.

Cc: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Roel Kluin 16 年之前
父節點
當前提交
320a46485c
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/media/video/tvp514x.c

+ 1 - 1
drivers/media/video/tvp514x.c

@@ -686,7 +686,7 @@ static int ioctl_s_routing(struct v4l2_int_device *s,
 			break;	/* Input detected */
 	}
 
-	if ((current_std == STD_INVALID) || (try_count < 0))
+	if ((current_std == STD_INVALID) || (try_count <= 0))
 		return -EINVAL;
 
 	decoder->current_std = current_std;