Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9036245pxu; Mon, 28 Dec 2020 05:04:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJxO5niAQjXCuGybTOZTu6wpbXydWFldxsOIn94kCWkCsXF3UR+Y7p4Uj2Aqqv8wS4cmz/P/ X-Received: by 2002:a17:906:30d3:: with SMTP id b19mr34653647ejb.538.1609160684785; Mon, 28 Dec 2020 05:04:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609160684; cv=none; d=google.com; s=arc-20160816; b=LdkPwDCkwSnjFjCo7m0tNpmRchxIdzJsUpngykuNVeJbfWezGASQKwErVdNmxmACam uIR/efKfW9T1auwepcePKthyTBt4mA3PU+NwbIAfAhNTbijJdkZkXMMU5rBsVIHixtbD Jl+EKPGIfKdMJu/yyI54HAaPuXPRvJE3dn0j4KyyZgSeQ9BLndBAA4AMUSzBpmpsIT6Z akGdVqk2OycwV+Zk+u30iiKM/SM/31bkXx1eUm9N6NXpnQFJkb7yVI+qGN4PKNJDaRO+ 1kLyfMh9Ry5ZVFBNd5x+47p2N5vKp+xIAuIWRKIwqsbWsgz09fte3arXriSFqifQoP4t QsTg== 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=XDJ5ZLc9NlGZIj/2w4aq16QS94sNw/R+9uUXlHQ8C2Tu3dG3wc4/TCuvwy6nbc+YCa /pW8BqH+isZK7Sdc/tZkjREb9wYFnYOR0XH8XAg2PMUd83e9QAuJSW/5WSxO6RCx6BWy bG/Nr39K56gSWo2HCcU8i6RLSjXNgcSiPBFiOhKEGLi2o6h+AeJLag3fi6Dek/k8q4bM HiTN3c3dMwIpvw4Qtr4BhqdHF20yGCfxf/oPrxJupwe2slshHth5Wm+WSk23kEFWgjNC dKfyXVOGsx/yH6K84LhnfY5WyXauEXknBMECdefEb+PlJJeFbpzquXx7y7UQd/mU+CzY U/ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=U6kLdm4b; 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 i12si19888989edr.321.2020.12.28.05.04.21; Mon, 28 Dec 2020 05:04:44 -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=U6kLdm4b; 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 S1730079AbgL1NC1 (ORCPT + 99 others); Mon, 28 Dec 2020 08:02:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:58302 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730053AbgL1NCX (ORCPT ); Mon, 28 Dec 2020 08:02:23 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1F6DB208BA; Mon, 28 Dec 2020 13:02:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609160527; bh=WwLHNuxmuCCpzXrmYhshiXOZurU6b2gUwUbayUAHwPM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U6kLdm4bRWjhQkql3B9tCTP3v1QGG+P1Q5/5l5W7h1GwStiCqC3KjZxAzcB5iqkwg fONSbSWxniJNIjnMBvwL6z8h0mpSkRkEuEX543pso9zlnJqBbXzmVfhYszmZJngTNO nqKZJx1QB9dz3Z+Yi2+1RFNDnWBQIHefbMc4/xFY= 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.9 081/175] cw1200: fix missing destroy_workqueue() on error in cw1200_init_common Date: Mon, 28 Dec 2020 13:48:54 +0100 Message-Id: <20201228124857.162506921@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124853.216621466@linuxfoundation.org> References: <20201228124853.216621466@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