[alsa-devel] [PATCH 14/21] Simplify dsp code close.
linux at audioscience.com
linux at audioscience.com
Thu Dec 22 01:38:44 CET 2011
From: Eliot Blennerhassett <eblennerhassett at audioscience.com>
dsp_code struct is not created if firmware is invalid, so check
and zero of firmware pointer is not necessary
Signed-off-by: Eliot Blennerhassett <eblennerhassett at audioscience.com>
---
sound/pci/asihpi/hpidspcd.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/sound/pci/asihpi/hpidspcd.c b/sound/pci/asihpi/hpidspcd.c
index 21cdb9e..456a758 100644
--- a/sound/pci/asihpi/hpidspcd.c
+++ b/sound/pci/asihpi/hpidspcd.c
@@ -109,11 +109,8 @@ error1:
/*-------------------------------------------------------------------*/
void hpi_dsp_code_close(struct dsp_code *dsp_code)
{
- if (dsp_code->pvt->firmware) {
- HPI_DEBUG_LOG(DEBUG, "dsp code closed\n");
- release_firmware(dsp_code->pvt->firmware);
- dsp_code->pvt->firmware = NULL;
- }
+ HPI_DEBUG_LOG(DEBUG, "dsp code closed\n");
+ release_firmware(dsp_code->pvt->firmware);
kfree(dsp_code->pvt);
}
--
1.7.0.4
More information about the Alsa-devel
mailing list