linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* re: [media] go7007: don't continue if firmware can't be loaded
@ 2015-10-22  8:46 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2015-10-22  8:46 UTC (permalink / raw)
  To: hans.verkuil; +Cc: linux-media

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-10-22  8:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-22  8:46 [media] go7007: don't continue if firmware can't be loaded Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).