Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9081371pxu; Mon, 28 Dec 2020 06:11:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJzt/Hx7ls2v9OvjfcxSIWBkGzf3IkV5QiR9olbs68WHsTb2Lt8jF61SteakxGR4gHph/Qt+ X-Received: by 2002:a17:906:f0cc:: with SMTP id dk12mr42661706ejb.480.1609164685140; Mon, 28 Dec 2020 06:11:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609164685; cv=none; d=google.com; s=arc-20160816; b=e4FiOA3Shwkz2gV+gs5F8qmly46bj/j5+k6tGhKLuaqsL8SPz7HMXRc5lKpfxy9uvz FlP/rXjTJIYClDAG5oWzhgVBdmXJOGiurFr1MO5ynw/0bGA9YaCzjQBrB0FUTBCayNTC F2Wy9xdQIwfPzelqwesgMnn7XKmKXAwIVVtus6tx8KHf9UogRWHbGXX557gNE934eg4M jQNHsxn1BDunfmYCtdAtxHMVK7IpVHa0/AvpsTzm0gRl3CKoIKHUqP1nO0Fnj8OtffQb wleWQKB/zhGGlCjZiO8PAt+mhzbBhplsBsP8IJaP3reEPwZwa/I3OTijmrdEDeFlA0Ez jOUg== 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=n0Nr8VQi6Rf/9mrYYJLs/bgrMM+Or4lEoP5eSSMvbWo=; b=rFRoRampRk/k1gB/4T3DPKMX8ImjvCoDzM1u9BHsgW86BOlSVBJRrjBxoKOZ85yLb+ dMpx14SSB7OIZ5wbt7EWeZbBw3FTfO4O+oRGBxpQ+DDH1xnTxpGHoHA7yR65Eh2vJi5m WoGMx2pZ2H04vHXUcSS2A2acO9dmlyYt/QiSilzgAdkYJyMeCIFwfA0cquS1XQM5HwtO Wg55eLF9B/3o+s0xafvNGnUnWwfIkf64BNc41iWclFd5zq/Ls9PAD20cnm/QF77H0FIv WVONzbCYDXFk3RNWV/Cm4Fvd2/oRSRDENon4kHxyxVmaiD3MosbToH7ED0Tq7VoQz8vN L/mQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KguvN+N9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ne6si21174173ejb.6.2020.12.28.06.11.01; Mon, 28 Dec 2020 06:11:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KguvN+N9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S2391724AbgL1OJB (ORCPT + 99 others); Mon, 28 Dec 2020 09:09:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:43544 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2438742AbgL1OI4 (ORCPT ); Mon, 28 Dec 2020 09:08:56 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 532F320791; Mon, 28 Dec 2020 14:08:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164496; bh=O2PRYyDqbsbswwDGsSrHSeDgcA6alKnvMXOiCqxQE70=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KguvN+N9VlCO0JEB07e4Jmu/8yB1U2CWmtulsOrAhde2bXMLET70xyY4LZQBxwUGj 3SLj4lLhSTRRvoejQrSY9QMV63VQULTNCp9ZMxtUvYzNZyYQwg22Zdvdn1dsOcQe25 Tpcnbh0g+5IHEKIS4SqW4MN2k1Ybb0QSb7VL4JMo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Qinglang Miao , Kalle Valo , Sasha Levin Subject: [PATCH 5.10 200/717] cw1200: fix missing destroy_workqueue() on error in cw1200_init_common Date: Mon, 28 Dec 2020 13:43:18 +0100 Message-Id: <20201228125030.558323947@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Qinglang Miao [ Upstream commit 7ec8a926188eb8e7a3cbaca43ec44f2d7146d71b ] Add the missing destroy_workqueue() before return from cw1200_init_common in the error handling case. Fixes: a910e4a94f69 ("cw1200: add driver for the ST-E CW1100 & CW1200 WLAN chipsets") Reported-by: Hulk Robot Signed-off-by: Qinglang Miao Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201119070842.1011-1-miaoqinglang@huawei.com Signed-off-by: Sasha Levin --- drivers/net/wireless/st/cw1200/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/st/cw1200/main.c b/drivers/net/wireless/st/cw1200/main.c index f7fe56affbcd2..326b1cc1d2bcb 100644 --- a/drivers/net/wireless/st/cw1200/main.c +++ b/drivers/net/wireless/st/cw1200/main.c @@ -381,6 +381,7 @@ static struct ieee80211_hw *cw1200_init_common(const u8 *macaddr, CW1200_LINK_ID_MAX, cw1200_skb_dtor, priv)) { + destroy_workqueue(priv->workqueue); ieee80211_free_hw(hw); return NULL; } @@ -392,6 +393,7 @@ static struct ieee80211_hw *cw1200_init_common(const u8 *macaddr, for (; i > 0; i--) cw1200_queue_deinit(&priv->tx_queue[i - 1]); cw1200_queue_stats_deinit(&priv->tx_queue_stats); + destroy_workqueue(priv->workqueue); ieee80211_free_hw(hw); return NULL; } -- 2.27.0