All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: hans.verkuil@cisco.com
Cc: linux-media@vger.kernel.org
Subject: re: [media] go7007: don't continue if firmware can't be loaded
Date: Thu, 22 Oct 2015 11:46:34 +0300	[thread overview]
Message-ID: <20151022084634.GA8196@mwanda> (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

                 reply	other threads:[~2015-10-22  8:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151022084634.GA8196@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=hans.verkuil@cisco.com \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.