Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9172443pxu; Mon, 28 Dec 2020 08:22:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJwI1iRDRwTSn5tmCiV0Lun0IsH27503zeKsE74RCxxiJ+4Oe9QYBCKmRJCSnBs+cU45gLyL X-Received: by 2002:a17:906:591a:: with SMTP id h26mr41600851ejq.174.1609172542124; Mon, 28 Dec 2020 08:22:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609172542; cv=none; d=google.com; s=arc-20160816; b=l68kMHFY+0D1D7tXh3Rp2T4fMgBj7F7zD+thSeSJYfpSCsdx7RmfY/E0Qx4VkHKxGM eSQSdbqdJd35ZYiJ6cRhEbJ1zqQMkifMxjre/iLhFiXnjTTJ1DLhrtbl9FqMkLc6ANry CGfB/EnUMuKqkMGdL5FixV8/DzaxJhwnBsddgbQFInw5EG6RC2Ey+tLoggiNLrKtqiq/ VmKTPrPq1/d9dr/8HVZ+XE+HH0D3N1Mcc3PHh6DPEgNMFPbN/0CWeQhLBDEBjVP63UOG S0M+69I/6i1+y6guCzQ99lSP90eIzKzpL6WlqnbGwjR8fIjwBsd1UisfUnuPD59pjX82 VOCw== 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=ZGNWi81uLKJfZvsFHL8Msgt+D353sXs9OxocqQDUN7Y=; b=H2f0i6ZSeNFTRKRC3m/ihE9WZ5cU9Man5/V00+MFQgez/v6IIjNpn7FJLS+vgQTI7C Bk2UAROKgEfmH/gLZABEGfDhDi/TrgC/YSE4+wIyMQULzXbzVXW6qGTGGyUd4OxQfxu9 NIDKRg8SluktGgdhw7rq9cQBHjuMVgxkrKShdC7EsEsCIjUrVUcHjmA8mJUXOQhHFaoV +CYKRp8caw+h5CrcUMCEcvXlZhGgRoLea9nm/8pehvx+tx0XMLeLUiu+PsemolXGgdxy /55w3XVxIjSoemJmr8xPLcOm2TnVIAs5Hyoujk2zdEhlSjLVfNd1sVV5pYmCB50/kq6V D66g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=e7RIWEAY; 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 u30si21035519edb.89.2020.12.28.08.21.59; Mon, 28 Dec 2020 08:22:22 -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=e7RIWEAY; 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 S2388852AbgL1QTs (ORCPT + 99 others); Mon, 28 Dec 2020 11:19:48 -0500 Received: from mail.kernel.org ([198.145.29.99]:42382 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732459AbgL1NOP (ORCPT ); Mon, 28 Dec 2020 08:14:15 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id AF0D4208D5; Mon, 28 Dec 2020 13:13:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609161215; bh=WwLHNuxmuCCpzXrmYhshiXOZurU6b2gUwUbayUAHwPM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e7RIWEAYooijBycGj5x9gzxS9d6qOzuQSgMzO+n3e+ZIwJm4MNpm7EmNbItMxHM2x kW4da8mmYki/kAU4/Pl77Wdou6ooOA2+dF9ksLewsuuC0dGJImJT6oSxkQeAOs1vgv JYpZWL0kJUn1WxloHAUVCQYgV5IowZ2LaMBNZnAc= 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 4.14 111/242] cw1200: fix missing destroy_workqueue() on error in cw1200_init_common Date: Mon, 28 Dec 2020 13:48:36 +0100 Message-Id: <20201228124910.152829485@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124904.654293249@linuxfoundation.org> References: <20201228124904.654293249@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 84624c812a15f..f4338bce78f4a 100644 --- a/drivers/net/wireless/st/cw1200/main.c +++ b/drivers/net/wireless/st/cw1200/main.c @@ -385,6 +385,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; } @@ -396,6 +397,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