From: Eliot Blennerhassett Date: Thu, 22 Dec 2011 00:38:44 +0000 (+1300) Subject: ALSA: asihpi - Simplify dsp code close. X-Git-Tag: v3.3-rc1~88^2~1^2~33 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=50d5f773ecc42fec029530f0e2e22686ccdf0ac7;p=~emulex%2Finfiniband.git 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 Signed-off-by: Takashi Iwai --- 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); }