diff options
author | Eliot Blennerhassett <eblennerhassett@audioscience.com> | 2011-12-22 13:38:44 +1300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-12-22 08:13:06 +0100 |
commit | 50d5f773ecc42fec029530f0e2e22686ccdf0ac7 (patch) | |
tree | 37c42d44b6b6918004f52660c7dfe9f816d78c41 /sound/pci | |
parent | 7036b92d303a01477e27a5a9b2d582a5df3cc8ef (diff) | |
download | linux-3.10-50d5f773ecc42fec029530f0e2e22686ccdf0ac7.tar.gz linux-3.10-50d5f773ecc42fec029530f0e2e22686ccdf0ac7.tar.bz2 linux-3.10-50d5f773ecc42fec029530f0e2e22686ccdf0ac7.zip |
ALSA: asihpi - Simplify dsp code close.
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@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | 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 21cdb9e39fb..456a758f04f 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); } |