From: Takashi Iwai <tiwai@suse.de>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: onkel@paraair.de, alsa-devel@alsa-project.org
Subject: Re: [bug report] ALSA: usb-audio: Tascam US-16x08 DSP mixer quirk
Date: Wed, 22 Feb 2017 22:10:08 +0100 [thread overview]
Message-ID: <s5ha89erky7.wl-tiwai@suse.de> (raw)
In-Reply-To: <20170222184649.GA589@mwanda>
On Wed, 22 Feb 2017 19:46:49 +0100,
Dan Carpenter wrote:
>
> 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;
Thanks for the report.
The buggy part was already removed in the later patch.
Takashi
prev parent reply other threads:[~2017-02-22 21:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-22 18:46 [bug report] ALSA: usb-audio: Tascam US-16x08 DSP mixer quirk Dan Carpenter
2017-02-22 21:10 ` Takashi Iwai [this message]
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=s5ha89erky7.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=dan.carpenter@oracle.com \
--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