diff --git a/sound/usb/card.c b/sound/usb/card.c index 9e5276d6dda05c999fcba24ff35ab7345513c6da..2ddc034673a8e99d232ebe62b87ff4115628d453 100644 --- a/sound/usb/card.c +++ b/sound/usb/card.c @@ -315,7 +315,8 @@ static int snd_usb_audio_free(struct snd_usb_audio *chip) snd_usb_endpoint_free(ep); mutex_destroy(&chip->mutex); - dev_set_drvdata(&chip->dev->dev, NULL); + if (!atomic_read(&chip->shutdown)) + dev_set_drvdata(&chip->dev->dev, NULL); kfree(chip); return 0; }