diff options
Diffstat (limited to 'sound/core/sound.c')
| -rw-r--r-- | sound/core/sound.c | 5 | 
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/core/sound.c b/sound/core/sound.c index b30f027eb0fe..a9ad4379523b 100644 --- a/sound/core/sound.c +++ b/sound/core/sound.c @@ -134,8 +134,11 @@ static struct snd_minor *autoload_device(unsigned int minor)  	if (dev == SNDRV_MINOR_CONTROL) {  		/* /dev/aloadC? */  		int card = SNDRV_MINOR_CARD(minor); -		if (snd_cards[card] == NULL) +		struct snd_card *ref = snd_card_ref(card); +		if (!ref)  			snd_request_card(card); +		else +			snd_card_unref(ref);  	} else if (dev == SNDRV_MINOR_GLOBAL) {  		/* /dev/aloadSEQ */  		snd_request_other(minor);  |