Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Detlef Urban <onkel@paraair.de>, alsa-devel@alsa-project.org
Subject: [bug report] ALSA: usb-audio: Tascam US-16x08 DSP mixer quirk
Date: Wed, 22 Feb 2017 21:46:49 +0300	[thread overview]
Message-ID: <20170222184649.GA589@mwanda> (raw)

Hello Detlef Urban,

This is a semi-automatic email about new static checker warnings.

The patch d2bb390a2081: "ALSA: usb-audio: Tascam US-16x08 DSP mixer 
quirk" from Feb 20, 2017, leads to the following Smatch complaint:

sound/usb/mixer_us16x08.c:716 snd_us16x08_meter_get()
	 warn: variable dereferenced before check 'elem' (see line 711)

sound/usb/mixer_us16x08.c
   710		struct usb_mixer_elem_info *elem = kcontrol->private_data;
   711		struct snd_usb_audio *chip = elem->head.mixer->chip;
                                             ^^^^^^^^^^^^^^^^^^^^^^
Dereference.

   712		struct snd_us16x08_meter_store *store = elem->private_data;
   713		u8 meter_urb[64];
   714		char tmp[max(sizeof(mix_init_msg1), sizeof(mix_init_msg2))];
   715	
   716		if (elem) {
                    ^^^^
Check.

   717			store = (struct snd_us16x08_meter_store *) elem->private_data;
   718			chip = elem->head.mixer->chip;

regards,
dan carpenter

             reply	other threads:[~2017-02-22 18:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-22 18:46 Dan Carpenter [this message]
2017-02-22 21:10 ` [bug report] ALSA: usb-audio: Tascam US-16x08 DSP mixer quirk Takashi Iwai

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=20170222184649.GA589@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=onkel@paraair.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox