Skip to contentSkip to conversation

go7007: don't continue if firmware can't be loaded

media Dan Carpenter 1 participant 1 message Oct 22, 2015 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

Hello Hans Verkuil,

The patch 59aea928d57f: "[media] go7007: don't continue if firmware can't be loaded" from Mar 17, 2013, leads to the following static checker warning:

	drivers/media/usb/go7007/go7007-usb.c:1292 go7007_usb_probe()
	warn: we tested 'board->flags & (1 << 0)' before and it was 'true'

drivers/media/usb/go7007/go7007-usb.c
1289
1290 /* Allocate the URBs and buffers for receiving the audio stream */
1291 if ((board->flags & GO7007_USB_EZUSB) &&
1292 (board->flags & GO7007_BOARD_HAS_AUDIO)) {

We used to test "go->audio_enabled" enabled here. The GO7007_USB_EZUSB and GO7007_BOARD_HAS_AUDIO are different names for BIT(0).

  1293                  for (i = 0; i < 8; ++i) {
  1294                          usb->audio_urbs[i] = usb_alloc_urb(0, GFP_KERNEL);
  1295                          if (usb->audio_urbs[i] == NULL)
  1296                                  goto allocfail;
  1297                          usb->audio_urbs[i]->transfer_buffer = kmalloc(4096,
  1298                                                                  GFP_KERNEL);
  1299                          if (usb->audio_urbs[i]->transfer_buffer == NULL)
  1300                                  goto allocfail;
  1301                          usb_fill_bulk_urb(usb->audio_urbs[i], usb->usbdev,
  1302                                  usb_rcvbulkpipe(usb->usbdev, 8),
  1303                                  usb->audio_urbs[i]->transfer_buffer, 4096,
  1304                                  go7007_usb_read_audio_pipe_complete, go);
  1305                  }
  1306          }

regards,
dan carpenter