Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9083676pxu; Mon, 28 Dec 2020 06:14:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJx1l013fh/XREyBw8k6yIURQ3dj3b/lh4POh2vPjMO99fi0Dq611851haX3VLcUZQaKb6uN X-Received: by 2002:a05:6402:100c:: with SMTP id c12mr43877078edu.356.1609164869915; Mon, 28 Dec 2020 06:14:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609164869; cv=none; d=google.com; s=arc-20160816; b=C++Ea6bwaNCYGQUxdyLxFd3ZtD+oEPPIKxCPlhXFKXzjKJQFBgurddlAesIYEtIQZJ ThiP+JS/wyyTdZhq/JHlK/GoMaV+PJKzhRE3TrapJU3UX0VFknQCz22h9OfsXCNYQoB/ +pa4ZMCnarT1IxF9aH+fhPlAFUSIgxqEVz5g5xdEdZUEGceYLY2eNAdOf7ioMN6I+GSd h5wuXUr8My9z/n9ZAx2y4GMxHVjrpyJaki4EPoY88vv5xCmaCnmdeMRIxoYYtPwfmePY G5vk/PhfHnQimgbglcDLcv9tiNAs6wcSw4aq8XwLGl7ek3H6hJ7iDxivPbZGOp0TVp9G l2xw== 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=4PFXyLqvzyW5mD5k8YkOACcrRhW+6J8zaVZzGAGjfTk=; b=rz72P2yhKN3ARa9JlFgYOJ26giEOKnplOv+UJctd8iSmF+Id1ZW4FyHuvrUh9T2BDL XGxXAMML7F7f/87/3E3cON32XVct9E+KAcsWoxb39bKUTNd+1TW6HK0QIJs0E2XfO3O/ xRy4bDE78axSZ+fhN9lWCiW2S8nmr/jXqwA2AhoXLFLnconTf59Q/g9DY2izH0areevN CBZ5HVs2kWL1xB/KdbT1WjeFi3101unSkZb4SaIXtvGuSW8X8oLR2WK/aVQ2yNLXUM7w baZBTB3fyvsF/kqpSn/gk0gGOi8M/bH5zSbtvFOIWgNoxs0sX309QGjnHOTTgR9m2hu/ G7zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nMprFc5x; 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 c8si22332220edq.432.2020.12.28.06.14.07; Mon, 28 Dec 2020 06:14:29 -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=nMprFc5x; 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 S2439847AbgL1OMT (ORCPT + 99 others); Mon, 28 Dec 2020 09:12:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:46838 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2439833AbgL1OMR (ORCPT ); Mon, 28 Dec 2020 09:12:17 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5679220791; Mon, 28 Dec 2020 14:11:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164696; bh=lPC9s+NeTV5223FnylS4QEQsyaanrHiIsaYsF+ldR14=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nMprFc5xXE1s5kgYrjL91EjswgAERLGPA6/dbYhqhR2CtlLT96+L4JbCwdKbvQWCF dHBtNfKccpmkwrW3DeZrV5pBWU04eVte0X5j6ohnem2oi6Y2Oiz+XRMja08OGDZSMR hq5tU17QlNBSyt6mYf240rBmgmh7cY40hu/8zA3M= 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 5.10 265/717] ath10k: Release some resources in an error handling path Date: Mon, 28 Dec 2020 13:44:23 +0100 Message-Id: <20201228125033.706518072@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: Christophe JAILLET [ Upstream commit 6364e693f4a7a89a2fb3dd2cbd6cc06d5fd6e26d ] Should an error occur after calling 'ath10k_usb_create()', it should be undone by a corresponding 'ath10k_usb_destroy()' call Fixes: 4db66499df91 ("ath10k: add initial USB support") Signed-off-by: Christophe JAILLET Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201122170358.1346065-1-christophe.jaillet@wanadoo.fr Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/ath10k/usb.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/usb.c b/drivers/net/wireless/ath/ath10k/usb.c index 0b47c3a09794c..19b9c27e30e20 100644 --- a/drivers/net/wireless/ath/ath10k/usb.c +++ b/drivers/net/wireless/ath/ath10k/usb.c @@ -1011,7 +1011,7 @@ static int ath10k_usb_probe(struct usb_interface *interface, ret = ath10k_core_register(ar, &bus_params); if (ret) { ath10k_warn(ar, "failed to register driver core: %d\n", ret); - goto err; + goto err_usb_destroy; } /* TODO: remove this once USB support is fully implemented */ @@ -1019,6 +1019,9 @@ static int ath10k_usb_probe(struct usb_interface *interface, return 0; +err_usb_destroy: + ath10k_usb_destroy(ar); + err: ath10k_core_destroy(ar); -- 2.27.0