提交 07e0e93d 编写于 作者: J Jesper Juhl 提交者: Linus Torvalds

[PATCH] maestro3 vfree NULL check fixup

vfree() checks for NULL, no need to do it explicitly.
Signed-off-by: NJesper Juhl <jesper.juhl@gmail.com>
Acked-by: NZach Brown <zab@zabbo.net>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 457d3d43
......@@ -2582,15 +2582,9 @@ static int alloc_dsp_suspendmem(struct m3_card *card)
return 0;
}
static void free_dsp_suspendmem(struct m3_card *card)
{
if(card->suspend_mem)
vfree(card->suspend_mem);
}
#else
#define alloc_dsp_suspendmem(args...) 0
#define free_dsp_suspendmem(args...)
#endif
/*
......@@ -2717,7 +2711,7 @@ static int __devinit m3_probe(struct pci_dev *pci_dev, const struct pci_device_i
if(ret) {
if(card->iobase)
release_region(pci_resource_start(pci_dev, 0), pci_resource_len(pci_dev, 0));
free_dsp_suspendmem(card);
vfree(card->suspend_mem);
if(card->ac97) {
unregister_sound_mixer(card->ac97->dev_mixer);
kfree(card->ac97);
......@@ -2760,7 +2754,7 @@ static void m3_remove(struct pci_dev *pci_dev)
}
release_region(card->iobase, 256);
free_dsp_suspendmem(card);
vfree(card->suspend_mem);
kfree(card);
}
devs = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册