diff options
-rw-r--r-- | sound/usb/card.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/usb/card.c b/sound/usb/card.c index 9e5276d6..2ddc034 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; } |