Skip to contentSkip to conversation

v4l2-ioctl.c: fix inverted condition

PATCH New Hans Verkuil 1 participant 1 message Sep 21, 2014 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 v4l2-ioctl.c: fix inverted condition

v4l_print_ext_controls() would print the 'size' if it was 0 and 'value' if size was non-zero, but it should have been the other way around.

---
 drivers/media/v4l2-core/v4l2-ioctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/v4l2-core/v4l2-ioctl.c +1 -1
index 46f4c04..9ccb19a 100644
@@ -562,7 +562,7 @@ static void v4l_print_ext_controls(const void *arg, bool write_only)
 	pr_cont("class=0x%x, count=%d, error_idx=%d",
 			p->ctrl_class, p->count, p->error_idx);
 	for (i = 0; i < p->count; i++) {
-		if (p->controls[i].size)
+		if (!p->controls[i].size)
 			pr_cont(", id/val=0x%x/0x%x",
 				p->controls[i].id, p->controls[i].value);
 		else
Signature · 1 line
2.1.0