Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2777954ybt; Mon, 22 Jun 2020 06:51:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0dXn9oAdM3ve7iN7gXyjM6YP4sywug1Si0HxCycWmIBvc71S0BJ3shQqBKzLfdSmKWgSd X-Received: by 2002:a50:a45d:: with SMTP id v29mr3910039edb.284.1592833872952; Mon, 22 Jun 2020 06:51:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592833872; cv=none; d=google.com; s=arc-20160816; b=VKmtdgU8OiOqN6vE46VrGCbyFZgzpSpDy17iiPyBymlWyWtXeSCle3XcsXxsLMe1Qi yfwYyVF0sxBdMTEN1C9WSfa0PPWjgeCWQjtVieqzR8s4Nzi/UjRm1G2+AWeS7cvZrPGa ixYXFkxJY1PU2215ITnnAFNRaqzz5Y4j5Z7ojkLrUWwOlHnpALoR8UmmzSX38wYEtwjy XAODHcWMZ/tT+Avw79SGyf/8dhfb1A6wOHMWIQKscUrZc6CdeIyfL+ADFu7hSPSmBTs8 9yzYpiinkxLoO8tU4gJEZuyVUhN/4RiLzWraXUqMMDPfLCuE3o3CbUZSSBBrQLvabYqb NDkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Oup+Qg+gx0lwOpxrIcNcQeVtWa4qLlg7bek30l6mtbU=; b=jwlK3OS6j1g5xVYfWG+i3L7T/rdEtf2L8HtoE74sfrPVA+bu+avxKpsDP21QHSjy6D A9cf5I42xVuvF4hXBXgwuRucNGLyuRIozMxdO9nb3tzr9U3N+SMG+WuXp3dsFu66lyMV NlnAZM37mfJnTcmrFXsP3wAph35IB9i3aP/1RbBl9TkJeQE84WJr0CbdRjgBmZXqD6Wi C0y6MqRmwO1Rw5gVwgVRZgA+GHrPFVg9zPimZhL+XfvMj517lZjYxr0XvcnzqSLnvKLf 0hTTZukTZr2PnBZQjzB7wxMWB5rU59vgKV2gHxKkWy7m2lNwUiGn9990j6DqqImpaVPp iSXw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t15si9263388edy.62.2020.06.22.06.50.41; Mon, 22 Jun 2020 06:51:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728677AbgFVNsI (ORCPT + 99 others); Mon, 22 Jun 2020 09:48:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728212AbgFVNsH (ORCPT ); Mon, 22 Jun 2020 09:48:07 -0400 Received: from mxout012.mail.hostpoint.ch (mxout012.mail.hostpoint.ch [IPv6:2a00:d70:0:e::312]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33694C061573 for ; Mon, 22 Jun 2020 06:48:07 -0700 (PDT) Received: from [10.0.2.46] (helo=asmtp013.mail.hostpoint.ch) by mxout012.mail.hostpoint.ch with esmtp (Exim 4.92.3 (FreeBSD)) (envelope-from ) id 1jnMPq-000B1F-4A; Mon, 22 Jun 2020 15:23:14 +0200 Received: from [2a02:168:6182:1:4840:f038:bf12:aa10] (helo=ryzen2700.dss.husqvarnagroup.com) by asmtp013.mail.hostpoint.ch with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3 (FreeBSD)) (envelope-from ) id 1jnMPk-0006GV-2c; Mon, 22 Jun 2020 15:23:14 +0200 X-Authenticated-Sender-Id: reto-schneider@reto-schneider.ch From: Reto Schneider To: linux-wireless@vger.kernel.org Cc: Larry.Finger@lwfinger.net, Reto Schneider Subject: [PATCH 3/3] rtl8192cu: Free ieee80211_hw if probing fails Date: Mon, 22 Jun 2020 15:21:13 +0200 Message-Id: <20200622132113.14508-4-code@reto-schneider.ch> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200622132113.14508-1-code@reto-schneider.ch> References: <20200622132113.14508-1-code@reto-schneider.ch> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org In case of an error, no one will use the allocated structure. Call ieee80211_free_hw, same as in rtl_usb_disconnect. Signed-off-by: Reto Schneider --- drivers/net/wireless/realtek/rtlwifi/usb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/realtek/rtlwifi/usb.c b/drivers/net/wireless/realtek/rtlwifi/usb.c index 1a9fcb2697bf..d05e709536ea 100644 --- a/drivers/net/wireless/realtek/rtlwifi/usb.c +++ b/drivers/net/wireless/realtek/rtlwifi/usb.c @@ -1087,6 +1087,7 @@ int rtl_usb_probe(struct usb_interface *intf, usb_put_dev(udev); complete(&rtlpriv->firmware_loading_complete); kfree(rtlpriv->usb_data); + ieee80211_free_hw(hw); return -ENODEV; } EXPORT_SYMBOL(rtl_usb_probe); -- 2.20.1