diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-08-30 16:21:00 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-08-30 16:21:00 -0400 |
commit | 5a798394c85f3bca963505d3be49180416fce132 (patch) | |
tree | c77c37e8a6a63d9f2b24c925cb07730e358a2c1e /sound/pci/cs5530.c | |
parent | fbaf6a5a35a830c2ae0449210efa31c165445735 (diff) |
ALSA: cs5530: Fix resource leak in error path
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=44741
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/cs5530.c')
-rw-r--r-- | sound/pci/cs5530.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/pci/cs5530.c b/sound/pci/cs5530.c index f1e4229993af..d1cca2831575 100644 --- a/sound/pci/cs5530.c +++ b/sound/pci/cs5530.c | |||
@@ -142,8 +142,7 @@ static int __devinit snd_cs5530_create(struct snd_card *card, | |||
142 | 142 | ||
143 | mem = pci_ioremap_bar(pci, 0); | 143 | mem = pci_ioremap_bar(pci, 0); |
144 | if (mem == NULL) { | 144 | if (mem == NULL) { |
145 | kfree(chip); | 145 | snd_cs5530_free(chip); |
146 | pci_disable_device(pci); | ||
147 | return -EBUSY; | 146 | return -EBUSY; |
148 | } | 147 | } |
149 | 148 | ||