Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] saa7115: fix querystd

Return V4L2_STD_UNKNOWN if no signal is detected.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

authored by

Hans Verkuil and committed by
Mauro Carvalho Chehab
af1f7284 416e87a4

+4 -1
+4 -1
drivers/media/i2c/saa7115.c
··· 1428 1428 *std &= V4L2_STD_SECAM; 1429 1429 break; 1430 1430 default: 1431 + *std = V4L2_STD_UNKNOWN; 1431 1432 /* Can't detect anything */ 1432 1433 break; 1433 1434 } ··· 1437 1436 v4l2_dbg(1, debug, sd, "Status byte 2 (0x1f)=0x%02x\n", reg1f); 1438 1437 1439 1438 /* horizontal/vertical not locked */ 1440 - if (reg1f & 0x40) 1439 + if (reg1f & 0x40) { 1440 + *std = V4L2_STD_UNKNOWN; 1441 1441 goto ret; 1442 + } 1442 1443 1443 1444 if (reg1f & 0x20) 1444 1445 *std &= V4L2_STD_525_60;