Fix the race at reconnection of the device.
The disconnected usb_chip[] must be cleared before the next probe
call properly.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
static int snd_usb_audio_free(struct snd_usb_audio *chip)
{
- usb_chip[chip->index] = NULL;
kfree(chip);
return 0;
}
list_for_each(p, &chip->mixer_list) {
snd_usb_mixer_disconnect(p);
}
+ usb_chip[chip->index] = NULL;
mutex_unlock(®ister_mutex);
snd_card_free_when_closed(card);
} else {