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>
This commit is contained in:
Eliot Blennerhassett 2011-12-22 13:38:44 +13:00 коммит произвёл Takashi Iwai
Родитель 7036b92d30
Коммит 50d5f773ec
1 изменённых файлов: 2 добавлений и 5 удалений

Просмотреть файл

@ -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);
}