Skip to contentSkip to conversation

tvp514x: try_count off by one.

PATCH New Roel Kluin 1 participant 1 message Jun 4, 2009 Media (V4L/DVB)

lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 tvp514x: try_count off by one.

with `while (try_count-- > 0)' try_count reaches -1 after the loop.

---

drivers/media/video/tvp514x.c +1 -1
index 4262e60..3750f7f 100644
@@ -692,7 +692,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;