From patchwork Sat Oct 22 07:21:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7841 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1153255wrr; Sat, 22 Oct 2022 04:05:11 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6DRcFYqSUpWWWt8uce3Ilsi+Ahxj64rFafgmNH76fX6OAc0u99gj7LE+gG3AGVRptyndFk X-Received: by 2002:a17:906:9bc3:b0:78d:816f:3743 with SMTP id de3-20020a1709069bc300b0078d816f3743mr19787366ejc.380.1666436710958; Sat, 22 Oct 2022 04:05:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666436710; cv=none; d=google.com; s=arc-20160816; b=JEMjWxmqQDnbjw2O49jKXZ99haWZNhY4VwL29/fi/eH1jzmBU9MPd9J/MPi9IF//F7 uuswv8aidrVDTwXfMrK1CV689dO8D13qFwZW5P5gxX0xOFLBjaAvScPbbJMkj4uG98xE 5SLlOjkVed5MxyhBbYO2EAL84VlGBu2yTJKPq8qO34O8NnjSSXDqaFzttHJd6N3zJJ2J vkT6HRUUCasuglFcbadtDDg3dKMA89LnfFLrxo3dPlOWlHp9fVp7bMf8plRkEzqwIIfX r6TQ4smy3spc3EqMfuBGot5VVv5gCuJB/F9KWAuqTKyRENlqpv8Ao+pNY+u/B+FYxIPn e85w== 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=hNGHAhikpfIlyBarfPF1lwHXQsbVm6NRxqOM6LasUto=; b=k3T4eEApeA2tZBp848OaB4m/DceM35ehl5Uf+cK+2SuzYe8yotKP7XQT+UVFFx5FGN z6xg+n9c7uyVwhNMVqErlVBWqZNnpTZtfHXuvuhEkN+5s8UnDg/y7D1m+dqnvY8ANASF uWdvszK7hvqs7N++qUmm3SCNrorMrhUyurxu/Q1+C3PhkYqArQ19jlx9vqF5xS3ASxlo VX/0zAiG9i7WqNO1X5aamXZ2eow+Dp2DCbSINVLRnry+zzjgV/JyU281bnsRQtJfKUoz Q8LwA4rfn9IBYxmdI6LYCEVbbSEbYzel4alelN/gxwMQxAzM+zRNrnedQvWfbjDI/1+i tjeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LtGfJUQO; 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 nc7-20020a1709071c0700b0078e0e850902si22315141ejc.868.2022.10.22.04.04.37; Sat, 22 Oct 2022 04:05: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=LtGfJUQO; 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 S229921AbiJVK6D (ORCPT + 99 others); Sat, 22 Oct 2022 06:58:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230494AbiJVK5k (ORCPT ); Sat, 22 Oct 2022 06:57:40 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 167592E983F; Sat, 22 Oct 2022 03:16:29 -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 ams.source.kernel.org (Postfix) with ESMTPS id 58643B82E14; Sat, 22 Oct 2022 07:44:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C1DFEC433C1; Sat, 22 Oct 2022 07:44:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666424679; bh=/WHpOa08+5yeB5M68zBL42rWpAGT/Vty05ist5mnjeg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LtGfJUQOqawN9d7syREvvtG9DClXq9s5SiECps3YMp5JKvxHK/qJtoczZIdJrM9ml mwqKFtvirIDAe09oAqZQg2IELspSSsWLobL5hrNQ1+BDP/bPhkLLx5QfnPdhZOn9nO 5RaHzvP0HxMLFtDUoPGeBMDm4WnSSQtFtUJRpni8= 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 5.19 228/717] wifi: rtw88: add missing destroy_workqueue() on error path in rtw_core_init() Date: Sat, 22 Oct 2022 09:21:47 +0200 Message-Id: <20221022072455.457843616@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@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?1747385540819668084?= X-GMAIL-MSGID: =?utf-8?q?1747385540819668084?= 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(-) diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c index 645ef1d01895..c364482ab331 100644 --- a/drivers/net/wireless/realtek/rtw88/main.c +++ b/drivers/net/wireless/realtek/rtw88/main.c @@ -2037,7 +2037,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) { @@ -2047,11 +2047,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);