[media] go7007: fix broken test
authorHans Verkuil <hverkuil@xs4all.nl>
Thu, 22 Oct 2015 08:56:21 +0000 (06:56 -0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 17 Nov 2015 16:33:41 +0000 (14:33 -0200)
The wrong flags field was tested for the GO7007_BOARD_HAS_AUDIO flag: that
flag is in board->main_info.flags, not in board->flags.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/usb/go7007/go7007-usb.c

index 564eabe829239fb86b336d5166069bfb21a7221b..3dbf14c85c5c847ef8544ec78b96936b76677fd4 100644 (file)
@@ -1289,7 +1289,7 @@ static int go7007_usb_probe(struct usb_interface *intf,
 
        /* Allocate the URBs and buffers for receiving the audio stream */
        if ((board->flags & GO7007_USB_EZUSB) &&
-           (board->flags & GO7007_BOARD_HAS_AUDIO)) {
+           (board->main_info.flags & GO7007_BOARD_HAS_AUDIO)) {
                for (i = 0; i < 8; ++i) {
                        usb->audio_urbs[i] = usb_alloc_urb(0, GFP_KERNEL);
                        if (usb->audio_urbs[i] == NULL)