Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1332456rdb; Wed, 6 Dec 2023 16:06:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IHiAYQqadpHw1EatROKS29jjHCua2knEAKFeqAGotjE3VIl/mdhCxzjxDUddG061TCC5kdQ X-Received: by 2002:a17:90a:30d:b0:286:ed84:bc4 with SMTP id 13-20020a17090a030d00b00286ed840bc4mr1755906pje.41.1701907574418; Wed, 06 Dec 2023 16:06:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701907574; cv=none; d=google.com; s=arc-20160816; b=rnKJEnjcSiChMqEQXkjKHUV32eaQS3wCUxGkRGa1QKwDg11kycZsES0cwBh4yiWtRY ihc9ATPtOmttx0Oz8PM4UoHKNTNTfzwHFbyv9p3D50l9RfjtYYv2Qm22a2CS26cCY3+/ rMf88hfMP8mUMjrv8QDKmsYv3FDKjF+4ezPCWMM1OMeBXIyoTlua5YE+twMsMKFBFc/f YnxjNR+Fy6kl6wlHdjWYTkf5O01kieJzDjWNerLSilKtplcH+D9ilaQZcMVsGveLr129 Sc0qLUCADLuDr9eEeU5M45rZuRz7Ue5yOtJA9YVvMej18ITnzHKu5i+BwOCFekFp3W75 PWeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=+H+30Qq0xdhChjaaOfX+lh2C2txmGBM5DSaA7nte+9o=; fh=zySoyVfK/7ExaDz2MWyww8poQ40q3tZak5TTvfb/Ovc=; b=HWahSXvNS1yTqPZ0GZf14wCSIq9LKZttEd7QYu8W+JE6MGk54DTlxV4gTWwGtIRTds QSJ8qrdkX29dSPWJralJs9TGXU8FXX1p+FKVkNNpHjQeeqbLaWuYTaNRT5v4LteOWJbL agwAvyHANNCD+zieFk/eRUNnxDBoNC6+UXM+FSvzn/kV7Glq8b7rekb2UC6nUA4aPugI pO68mxyGvtP+jkEcM3zyVW2nW7vj4nO+rOB5rNQz3U+vIsH/Nbb+cnEzDi+PO6YVq0Rh 6Cex/jaAMA8zGscCY633+STwNonR7xswN/BEZuccIFdd8/IQ8NvHEqczU58mCOHIyuiS 10MQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=irl.hu Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id e9-20020a17090301c900b001d08d307f89si54432plh.496.2023.12.06.16.06.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 16:06:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=irl.hu Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id C8D2E806CC2D; Wed, 6 Dec 2023 16:05:20 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1441842AbjLGAFE (ORCPT + 99 others); Wed, 6 Dec 2023 19:05:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232278AbjLGAEn (ORCPT ); Wed, 6 Dec 2023 19:04:43 -0500 Received: from irl.hu (irl.hu [95.85.9.111]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B22710C4 for ; Wed, 6 Dec 2023 16:04:39 -0800 (PST) Received: from fedori.lan (51b690cd.dsl.pool.telekom.hu [::ffff:81.182.144.205]) (AUTH: CRAM-MD5 soyer@irl.hu, ) by irl.hu with ESMTPSA id 0000000000071702.0000000065710C16.001190F6; Thu, 07 Dec 2023 01:04:38 +0100 From: Gergo Koteles To: Shenghao Ding , Kevin Lu , Baojun Xu , Jaroslav Kysela , Takashi Iwai , Liam Girdwood , Mark Brown Cc: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Gergo Koteles Subject: [PATCH 14/16] ALSA: hda/tas2781: call cleaner functions only once Date: Thu, 7 Dec 2023 01:04:30 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Mime-Autoconverted: from 8bit to 7bit by courier 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 06 Dec 2023 16:05:21 -0800 (PST) Prevent double free if only the DSP firmware is missing Signed-off-by: Gergo Koteles --- sound/pci/hda/tas2781_hda_i2c.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sound/pci/hda/tas2781_hda_i2c.c b/sound/pci/hda/tas2781_hda_i2c.c index 0972345c15e5..cb8872e15bb0 100644 --- a/sound/pci/hda/tas2781_hda_i2c.c +++ b/sound/pci/hda/tas2781_hda_i2c.c @@ -660,11 +660,6 @@ static void tasdev_fw_ready(const struct firmware *fmw, void *context) tasdevice_apply_calibration(tas_priv); out: - if (tas_priv->fw_state == TASDEVICE_DSP_FW_FAIL) { - /*If DSP FW fail, kcontrol won't be created */ - tasdevice_config_info_remove(tas_priv); - tasdevice_dsp_remove(tas_priv); - } mutex_unlock(&tas_hda->priv->codec_lock); if (fmw) release_firmware(fmw); -- 2.43.0