Re: [PATCH] ALSA: usb-audio: Fix double-free in snd_usb_add_audio_stream()

From: kbuild test robot
Date: Wed Mar 30 2016 - 15:35:44 EST


Hi Vladis,

[auto build test WARNING on sound/for-next]
[also build test WARNING on v4.6-rc1 next-20160330]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]

url: https://github.com/0day-ci/linux/commits/Vladis-Dronov/ALSA-usb-audio-Fix-double-free-in-snd_usb_add_audio_stream/20160331-030636
base: https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for-next
config: x86_64-acpi-redef (attached as .config)
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64

All warnings (new ones prefixed by >>):

sound/usb/quirks.c: In function 'create_fixed_stream_quirk':
>> sound/usb/quirks.c:204:2: warning: label 'error_after_add_audio_stream' defined but not used [-Wunused-label]
error_after_add_audio_stream:
^

vim +/error_after_add_audio_stream +204 sound/usb/quirks.c

188 */
189
190 fp->protocol = altsd->bInterfaceProtocol;
191
192 if (fp->datainterval == 0)
193 fp->datainterval = snd_usb_parse_datainterval(chip, alts);
194 if (fp->maxpacksize == 0)
195 fp->maxpacksize = le16_to_cpu(get_endpoint(alts, 0)->wMaxPacketSize);
196 usb_set_interface(chip->dev, fp->iface, 0);
197 snd_usb_init_pitch(chip, fp->iface, alts, fp);
198 snd_usb_init_sample_rate(chip, fp->iface, alts, fp, fp->rate_max);
199 return 0;
200
201 error:
202 kfree(fp);
203 kfree(rate_table);
> 204 error_after_add_audio_stream:
205 return err;
206 }
207
208 static int create_auto_pcm_quirk(struct snd_usb_audio *chip,
209 struct usb_interface *iface,
210 struct usb_driver *driver)
211 {
212 struct usb_host_interface *alts;

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: Binary data