From patchwork Wed Oct 19 08:25:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 4645 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp212296wrs; Wed, 19 Oct 2022 02:07:10 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5RDK30sDp7VLL1swA6i93x0he6d02v1JdLV7hC2qu8/wVBaSgCzOYdz/Qzr/CByPRMuS9L X-Received: by 2002:a63:2212:0:b0:43b:f03d:856a with SMTP id i18-20020a632212000000b0043bf03d856amr6386917pgi.192.1666170430460; Wed, 19 Oct 2022 02:07:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666170430; cv=none; d=google.com; s=arc-20160816; b=ra5y4KMTsZj6S8xLnJ1RXovfaT8xI3i9xY+dXm3GocX1YuTDrjUq+m5txz3U8T8bMR 7V8ER1oRs0R3l5j+FkcrLHL+8Np5GdEbApmXgW4sN4QFOs896QtQsZEyjeRJtetIQj+u 5HyCNr+diCUKo4+X0mjz0KjGwY6VrKZJIP7geTVrFVnidOuu738qbWB++JAJNHrVUCqX ySaRamIfzfTbgKfvDg8Flh2erkIDKCtQyhPF212THu3GALYbAnSmAuWQ7jfTs+XpOwsO hC5M/zhAC06gJi7ttt1aD9L0urnQfMYPSxRnt40R/qDR9bRqZvDRjtmgqhiYaoBiygTY DW3Q== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=b6XaaR/HHUa/x3KpQJeMHJVx2TjNf6+f1HNUjDNyQSg=; b=OARYpLb3+zIGbLsG+zfKVRZB6VCKnSomgQwZyI2bEMdtjzM8zeBlg+inwqtWQ5JD6s zckL1UpkEAbY62mfiKdQ/Csckut3SBepdzKMMPh8es2JXdX1H1QHH0MKgFCwgiTmNwte 5rO/+cVE/9WuxxToEx52tg3+a5PfS3Aw/nEgNgeC7EBjCnhaZQAMrQJVsl2b4mUwZ05p TMCnNPxFfpS3te7N26qkQdUb+Fu6Kxe4GA6J4TlIoAyNs4Iw0I+30cQ3eS05QGjX/h3K hDnsSOsFvKWR4f/jgTUUnFtvpFK4xbIGL+1EyULpEpzuOBPip3NNlF/vGFPKSsSQishO USZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="A/ovfSb8"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 63-20020a630242000000b0046107c067c7si17529762pgc.822.2022.10.19.02.06.47; Wed, 19 Oct 2022 02:07:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="A/ovfSb8"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231877AbiJSIzv (ORCPT + 99 others); Wed, 19 Oct 2022 04:55:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231974AbiJSIyP (ORCPT ); Wed, 19 Oct 2022 04:54:15 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF9D591847; Wed, 19 Oct 2022 01:51:12 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8F7AA61831; Wed, 19 Oct 2022 08:50:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A1814C433C1; Wed, 19 Oct 2022 08:50:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169408; bh=N7Z0fmsOKPI6czj4QQoycKm9e6SPcritX2riAcV8dNE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A/ovfSb8tQsfvFg390bstU0B4HgJ0CT6NtVTc0qIsTTjJ5PJw19QVRtmS9AmWrDGE 8SJ8rImmwyAJI3ieJrBJQQsDSh2yLTJUlA+FIoi+tOfkDM9/PQhEsuR/DHQzxY676x aj+NjeaOTrHECG9TIoSCkK9rf0A2KVOlOFSvW+t0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yang Yingliang , Ping-Ke Shih , Kalle Valo , Sasha Levin Subject: [PATCH 6.0 264/862] wifi: rtw88: add missing destroy_workqueue() on error path in rtw_core_init() Date: Wed, 19 Oct 2022 10:25:51 +0200 Message-Id: <20221019083301.695786772@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747106325083294199?= X-GMAIL-MSGID: =?utf-8?q?1747106325083294199?= From: Yang Yingliang [ Upstream commit b0ea758b30bbdf7c4323c78b7c50c05d2e1224d5 ] Add the missing destroy_workqueue() before return from rtw_core_init() in error path. Fixes: fe101716c7c9 ("rtw88: replace tx tasklet with work queue") Signed-off-by: Yang Yingliang Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220826023817.3908255-1-yangyingliang@huawei.com Signed-off-by: Sasha Levin --- drivers/net/wireless/realtek/rtw88/main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) --- a/drivers/net/wireless/realtek/rtw88/main.c +++ b/drivers/net/wireless/realtek/rtw88/main.c @@ -2045,7 +2045,7 @@ int rtw_core_init(struct rtw_dev *rtwdev ret = rtw_load_firmware(rtwdev, RTW_NORMAL_FW); if (ret) { rtw_warn(rtwdev, "no firmware loaded\n"); - return ret; + goto out; } if (chip->wow_fw_name) { @@ -2055,11 +2055,15 @@ int rtw_core_init(struct rtw_dev *rtwdev wait_for_completion(&rtwdev->fw.completion); if (rtwdev->fw.firmware) release_firmware(rtwdev->fw.firmware); - return ret; + goto out; } } return 0; + +out: + destroy_workqueue(rtwdev->tx_wq); + return ret; } EXPORT_SYMBOL(rtw_core_init);