Skip to content

Commit

Permalink
ALSA: asihpi - Simplify dsp code close.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eliot Blennerhassett authored and Takashi Iwai committed Dec 22, 2011
1 parent 7036b92 commit 50d5f77
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions sound/pci/asihpi/hpidspcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,8 @@ short hpi_dsp_code_open(u32 adapter, void *os_data, struct dsp_code *dsp_code,
/*-------------------------------------------------------------------*/
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);
}

Expand Down

0 comments on commit 50d5f77

Please sign in to comment.