Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9224797pxu; Mon, 28 Dec 2020 09:46:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJx2MjmpzmFJhugauVB3sCfHdJ5qqZ8lf9N30N13hA3m/e9/fs0eCiadxQIPT7O67wmr3Aop X-Received: by 2002:a17:906:890:: with SMTP id n16mr42812612eje.463.1609177571509; Mon, 28 Dec 2020 09:46:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609177571; cv=none; d=google.com; s=arc-20160816; b=WVHxqvURXJaDk8RN3gx4FNX/1RnlXz6zUMrSX8cAH7C4UcjORYBMxkum/VCFQ5o6G9 klwLiXMf2A/9VCqxu9WXZLeQE7UmFmbYGULgzki4KrELUAKunhvySRGcqUIcEpNn9dfm 1wE3ryR5SuX/Li7QXWTFjPGvD4iDpn2K70t/v5hKzJzfoj9ll9QPWlXJRLwdUKNp3nSZ eqUrio+SuRYU1MC0AKFPfJkmdaOTjd4NooMUpmvsJ9qFnym1uSRIIJLnwNo6Pr/hOIPf tDdPvEHoqHolOt+Iq6uNhgnpa1uOQroHdH5BLaTHas/rsgIHPlyfWp4xtQQsfy+Tz2CS w6EA== 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=4cDKXif/Ju0p/y5/BsmC/1SDYfwTTVpIZ+vrIxo/NI4=; b=bXFzkhlMckSfkRgyDeHpfK7YFnPF71+ECpUlVGl7czeXC8tmC6xTMH2IKadOa/g2sf wZNJQbl//UZ3vxbOGjASuz7AnJjWY0zihR6bIsD0aaJhKh3tq3WyI2Gi9uj5aTW0f11j vLHkCbPzde/WfNuk9s6hThD4ZD3BorSipFY8/lHmqeZwpw3eBzjXlHLFuNxMLdgk1G1L C/9RJlDvICx/c+/ekdMfKAJy+5FE9y6ImAtbsoBk13plWDskCQ8yB4Zs/DVYRnKMHcze UXna1ej6MvtIYmmLTNm6qYTf42TtLtLOhTw86CwwiUr+tj8jMsNO4eIssP0/5aHPuAro fMjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kjwu1bG+; 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 h17si20608220eds.404.2020.12.28.09.45.49; Mon, 28 Dec 2020 09:46:11 -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=kjwu1bG+; 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 S1731091AbgL1NN0 (ORCPT + 99 others); Mon, 28 Dec 2020 08:13:26 -0500 Received: from mail.kernel.org ([198.145.29.99]:41386 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731134AbgL1NNV (ORCPT ); Mon, 28 Dec 2020 08:13:21 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0E340208BA; Mon, 28 Dec 2020 13:12:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609161160; bh=2Yzs0RJG/rrec0gELQ7GRzXpQJwfWuq9NsNKxqTfAds=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kjwu1bG+3b1a76+btRUXA82Erz/wvvAvNGBDCBktZaUI8TZB2c4Jrixkr4rJsFcIv L6gnirLuGkpBVSiQnbBdZL6QTEFXsqRBvMWkzyxa3Qi5R059px5YRjQJKjx6w9UfX9 81OYL4ujR8t0Eu0BmZ4iSxOxNKjd2ClgAhOLDVpk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe JAILLET , Kalle Valo , Sasha Levin Subject: [PATCH 4.14 122/242] ath10k: Fix an error handling path Date: Mon, 28 Dec 2020 13:48:47 +0100 Message-Id: <20201228124910.699456307@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: Christophe JAILLET [ Upstream commit ed3573bc3943c27d2d8e405a242f87ed14572ca1 ] If 'ath10k_usb_create()' fails, we should release some resources and report an error instead of silently continuing. Fixes: 4db66499df91 ("ath10k: add initial USB support") Signed-off-by: Christophe JAILLET Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201122170342.1346011-1-christophe.jaillet@wanadoo.fr Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/ath10k/usb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/usb.c b/drivers/net/wireless/ath/ath10k/usb.c index c64a03f164c0f..f4e6d84bfb91c 100644 --- a/drivers/net/wireless/ath/ath10k/usb.c +++ b/drivers/net/wireless/ath/ath10k/usb.c @@ -1019,6 +1019,8 @@ static int ath10k_usb_probe(struct usb_interface *interface, ar_usb = ath10k_usb_priv(ar); ret = ath10k_usb_create(ar, interface); + if (ret) + goto err; ar_usb->ar = ar; ar->dev_id = product_id; -- 2.27.0