Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9398163pxu; Mon, 28 Dec 2020 15:11:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJyXkfm+BGgO452hJbeGv9D4QvDWxVzpsCNbN88VxhWqbIUpY0CIfjT9VJUlU+gWwOeR2/Ii X-Received: by 2002:a17:906:3099:: with SMTP id 25mr43528238ejv.321.1609197067519; Mon, 28 Dec 2020 15:11:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609197067; cv=none; d=google.com; s=arc-20160816; b=kfTJv3DVlbdorBiImcv5KwJpEKeIPrI8qndAtLoFBZdNr+Gd3tu1b14u3p0+agbtix dYSM8Kz43sTgK+ZaWGPM29EiGDYmAKMklZX2FJZjtYWOePSDbzCDMfkg+OHg+lLq2o8t clI/cCuqVgSirwUOgH1hWkmUdLgCbYz3+i/BE5n95rnHp7f24gXu5psbqyKAvhTB6doW qtXUD3RCUdrtMOxC0aU0Ta9pZmF1Eytl/vVoZy2U4tRvxPJWSgT6dmeHc+WlgMT9V6Az Fey5V/uJYqL8tDh21SKrzTApbv6yxIu8gJ+QGAwFV4p6J/4x3aHqVUgHBfqOtZiWxHl8 76nA== 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=24yw96/KKMHn8KV+uOMbAU5d03XxR9uCuG+YdGg+WV8=; b=rrPQu0lhUgfdXPUE1BHcASD/b37nZN9y/zF8dX7dKODCw/9Pzsmbb+CxNuHVDBFHxg END0DD8K1L+kiWO4Oi1RWwkffvGhOSJfw4l/JKOUuXAm4sDxGMLTV6MKgge0YRV640yX NjJ+NUxWYa7AfY2Ggou450xZE4KjMcsq6Y4XPw8hSVhkv+tVg1ihS69euCqF4j/mADzR 25UYptoVoV8jyAK7l+kn9YiDn5JjBocfdLHiooZ7BwEZ4dYWnkMZWBL80JOQ2DRp+95k FHRtN0b86HC0AIFMQxkbV0Ya5LMwYZXbQiUM5Po+Lt9CV8p8VNee624JtuO5NmUNwfoP mxWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xy520xXn; 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 re20si18109634ejb.112.2020.12.28.15.10.45; Mon, 28 Dec 2020 15:11:07 -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=xy520xXn; 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 S2439826AbgL1OMQ (ORCPT + 99 others); Mon, 28 Dec 2020 09:12:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:46804 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2439799AbgL1OMO (ORCPT ); Mon, 28 Dec 2020 09:12:14 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 813DA207AB; Mon, 28 Dec 2020 14:11:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164694; bh=Uw86gh/rvr5XYhJiwkCPt6TOs1Ja9Jq/oHlT4BnwVU0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xy520xXnf1prONYQIjosesyIZxSDD13O/RfrNt3cNaI0e7WVKk4nYNcGuVsY2rzpq xFgKCIFYip6T1tzNH6Z/SDlXZLnVNDXs98PlTNbq0l5irj/AnY20wqaWoTMKORYItb uLFOdBJhDH4PvUys3w06z5TE9Xf8LT2bq0zk6yus= 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 264/717] ath10k: Fix an error handling path Date: Mon, 28 Dec 2020 13:44:22 +0100 Message-Id: <20201228125033.657003240@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 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 05a620ff6fe2c..0b47c3a09794c 100644 --- a/drivers/net/wireless/ath/ath10k/usb.c +++ b/drivers/net/wireless/ath/ath10k/usb.c @@ -997,6 +997,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