projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
46724c2
)
ALSA: fm801: Fix double free in case of error in tuner detection
author
Ben Hutchings
<
[email protected]
>
Thu, 22 Sep 2011 13:38:58 +0000
(14:38 +0100)
committer
Takashi Iwai
<
[email protected]
>
Thu, 22 Sep 2011 13:51:46 +0000
(15:51 +0200)
Commit
9676001559fce06e37c7dc230ab275f605556176
("ALSA: fm801: add error handling if auto-detect fails") added
incorrect error handling.
Once we have successfully called snd_device_new(), the cleanup
function fm801_free() will automatically be called by snd_card_free()
and we must *not* also call fm801_free() directly.
Reported-by: Hor Jiun Shyong <
[email protected]
>
References: http://bugs.debian.org/641946
Signed-off-by: Ben Hutchings <
[email protected]
>
Cc:
[email protected]
[v3.0+]
Signed-off-by: Takashi Iwai <
[email protected]
>
sound/pci/fm801.c
patch
|
blob
|
history
diff --git
a/sound/pci/fm801.c
b/sound/pci/fm801.c
index f9123f09e83e7922aa5a518081d8d711d231e9a9..a96456daf3930c5c0b42506d3385f65990b7fd40 100644
(file)
--- a/
sound/pci/fm801.c
+++ b/
sound/pci/fm801.c
@@
-1236,7
+1236,6
@@
static int __devinit snd_fm801_create(struct snd_card *card,
(tea575x_tuner & TUNER_TYPE_MASK) < 4) {
if (snd_tea575x_init(&chip->tea)) {
snd_printk(KERN_ERR "TEA575x radio not found\n");
- snd_fm801_free(chip);
return -ENODEV;
}
} else if ((tea575x_tuner & TUNER_TYPE_MASK) == 0) {
@@
-1251,7
+1250,6
@@
static int __devinit snd_fm801_create(struct snd_card *card,
}
if (tea575x_tuner == 4) {
snd_printk(KERN_ERR "TEA575x radio not found\n");
- snd_fm801_free(chip);
return -ENODEV;
}
}