diff options
Diffstat (limited to 'drivers/media/video/v4l1-compat.c')
-rw-r--r-- | drivers/media/video/v4l1-compat.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/media/video/v4l1-compat.c b/drivers/media/video/v4l1-compat.c index 761fbd64db58..0c2105ca611e 100644 --- a/drivers/media/video/v4l1-compat.c +++ b/drivers/media/video/v4l1-compat.c | |||
@@ -564,10 +564,9 @@ static noinline long v4l1_compat_get_input_info( | |||
564 | break; | 564 | break; |
565 | } | 565 | } |
566 | chan->norm = 0; | 566 | chan->norm = 0; |
567 | err = drv(file, VIDIOC_G_STD, &sid); | 567 | /* Note: G_STD might not be present for radio receivers, |
568 | if (err < 0) | 568 | * so we should ignore any errors. */ |
569 | dprintk("VIDIOCGCHAN / VIDIOC_G_STD: %ld\n", err); | 569 | if (drv(file, VIDIOC_G_STD, &sid) == 0) { |
570 | if (err == 0) { | ||
571 | if (sid & V4L2_STD_PAL) | 570 | if (sid & V4L2_STD_PAL) |
572 | chan->norm = VIDEO_MODE_PAL; | 571 | chan->norm = VIDEO_MODE_PAL; |
573 | if (sid & V4L2_STD_NTSC) | 572 | if (sid & V4L2_STD_NTSC) |
@@ -776,10 +775,9 @@ static noinline long v4l1_compat_get_tuner( | |||
776 | tun->flags |= VIDEO_TUNER_SECAM; | 775 | tun->flags |= VIDEO_TUNER_SECAM; |
777 | } | 776 | } |
778 | 777 | ||
779 | err = drv(file, VIDIOC_G_STD, &sid); | 778 | /* Note: G_STD might not be present for radio receivers, |
780 | if (err < 0) | 779 | * so we should ignore any errors. */ |
781 | dprintk("VIDIOCGTUNER / VIDIOC_G_STD: %ld\n", err); | 780 | if (drv(file, VIDIOC_G_STD, &sid) == 0) { |
782 | if (err == 0) { | ||
783 | if (sid & V4L2_STD_PAL) | 781 | if (sid & V4L2_STD_PAL) |
784 | tun->mode = VIDEO_MODE_PAL; | 782 | tun->mode = VIDEO_MODE_PAL; |
785 | if (sid & V4L2_STD_NTSC) | 783 | if (sid & V4L2_STD_NTSC) |