Commit 50d5f773 authored by Eliot Blennerhassett's avatar Eliot Blennerhassett Committed by Takashi Iwai

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: default avatarEliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 7036b92d
...@@ -109,11 +109,8 @@ short hpi_dsp_code_open(u32 adapter, void *os_data, struct dsp_code *dsp_code, ...@@ -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) void hpi_dsp_code_close(struct dsp_code *dsp_code)
{ {
if (dsp_code->pvt->firmware) {
HPI_DEBUG_LOG(DEBUG, "dsp code closed\n"); HPI_DEBUG_LOG(DEBUG, "dsp code closed\n");
release_firmware(dsp_code->pvt->firmware); release_firmware(dsp_code->pvt->firmware);
dsp_code->pvt->firmware = NULL;
}
kfree(dsp_code->pvt); kfree(dsp_code->pvt);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment