Message ID | 20231020140655.v5.4.I5cd5dd190df0826e38444df217f63918a8b4ad39@changeid |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2010:b0:403:3b70:6f57 with SMTP id fe16csp1325484vqb; Fri, 20 Oct 2023 14:08:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGeT4VFcAl8EU9ENWgtw3+Rs/UUOLKs5i+BTrPPb2s5rApy9iLTjwDDSWrjoD/Ui8atX97k X-Received: by 2002:a05:6a21:6d86:b0:161:2cf2:75ec with SMTP id wl6-20020a056a216d8600b001612cf275ecmr3456157pzb.49.1697836126620; Fri, 20 Oct 2023 14:08:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697836126; cv=none; d=google.com; s=arc-20160816; b=UM3x0CU8f/qB18/MBG+jzBqL/f9alKiHeMNiiW/KmqRILviPewtLsZYhjCWhaDKhyE 8ILj02tikeKsGs3q0e8GAouN8Sgnov+u0gG70skccACnYpdfsvDvVcbxt4itW/r5MvSg 3J6nhNrUnMCrU686UwlUWpGVCfkEXJxHqF2n8pA6lZ60EdkMjcM8U1L2Z5OmU3nkGZVA LeZdoO8s0ad+UeA8cfcFZyXtX/eYlU61nzo79ZO68IaOSsc6HaRECbQNZ0jiU4qklKgq Ce2kyGQ/zb5JZqGKdM0kCdRGDs3fNc2h6ZDrIj6vk3U4aK7ltCf7bu+NC2ZHBS+g5mF6 7eEA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7Zu77mdO6sktTxTIEryyom1thHcuDOj/hZWn2X42FV4=; fh=kEqoz8zidtjso3SmfMjczCtIbJ5pQ/xI/9cg0767Egs=; b=WtKzh4ssUU5A3K+KJDXmymu3MviuYzHoh9mdUw14ey4SFAzYT5aGPXnqMi3q8Tpqh3 Qp2VPrChtfaENM58//53aaIx3vp7D6iKFHTm3fjEoehUzb/QxxhPbzwXUiUIXoyjigPg B/dQNiyT1AWhj8EuuEi0+yrZzOIb+OPtno8+V7N6dOKCzZFyddc0aJQ02q8qRe7NJmIg NjHHlHkilXxBfXkNDF3ffAIX1oLxxXgKLv5JjghsTRUw9NQAXHKbXQtWZBzDExI6yOIy jdHUeMih22iXl0Jz7XvlDmWgsVbuOB3a/C2phsmgEUOyLp3OxUSuj3MJIWIfp6QMxzNO wu4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=JQpI4Xq9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id r201-20020a632bd2000000b00577bf1de778si2632753pgr.585.2023.10.20.14.08.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 14:08:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=JQpI4Xq9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 62C0682D2B4A; Fri, 20 Oct 2023 14:08:44 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232791AbjJTVId (ORCPT <rfc822;a1648639935@gmail.com> + 26 others); Fri, 20 Oct 2023 17:08:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232326AbjJTVIY (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 20 Oct 2023 17:08:24 -0400 Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB26B10C4 for <linux-kernel@vger.kernel.org>; Fri, 20 Oct 2023 14:08:17 -0700 (PDT) Received: by mail-pg1-x52d.google.com with SMTP id 41be03b00d2f7-564b6276941so964687a12.3 for <linux-kernel@vger.kernel.org>; Fri, 20 Oct 2023 14:08:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1697836097; x=1698440897; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7Zu77mdO6sktTxTIEryyom1thHcuDOj/hZWn2X42FV4=; b=JQpI4Xq9/jEHrkcm4kJXBDeVRXV60Kerc9XYCSkWFo/LCREekDsJ3DWHm+24nd8KvB Lek83Q1Ofp5psUDEumOfu0j+LhCgvU3+DRgrLO/GPOholqm38o1ALoJWgeBIL6Adptcr TqLqCMKSbvugU36vN0YCUdzt9neldBO19oHTU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697836097; x=1698440897; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7Zu77mdO6sktTxTIEryyom1thHcuDOj/hZWn2X42FV4=; b=ScBezmHDnuIl+ykvw7Ll/cJlzB5FhVEP8kQSmy5R3of2mG4JwUH3BygbxPVSrpTkmE 1AV59S52nNxspwoM1uQK6l5NwlNgQTH6S1my7zafmVA++yeSAkG2JCH+LLgs+Icg8mjx +oXGkWV29rjgqQMJ7d6k8q0xQT6DqgMuu5xnfnM6yUCmKj7EQaaI9aVGneNlseVQmv9J ttHLp3RBk9VaDjwU76N+9lCLHDGCK6xACcO5IU//ga4SwjAzKNfryg9ZT/sbZjF/f2Lh aDYpgz1vPn7EJG/9bA0it2qYGpIQRoeaJoicJOBoaTsJgm2ZdIgFlBbeHiXHJVaT7Jc2 myrw== X-Gm-Message-State: AOJu0Yy2XMv33DonLxKFnJQOfG2yoAApWxYIo7k2H3UTjtHQkHrw+Tad tW4vXyZBW9Ai9qbIk/t7K6TZxQ== X-Received: by 2002:a05:6a20:7288:b0:13a:6bca:7a84 with SMTP id o8-20020a056a20728800b0013a6bca7a84mr3339806pzk.44.1697836097385; Fri, 20 Oct 2023 14:08:17 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:9d:2:c078:ee4f:479f:8486]) by smtp.gmail.com with ESMTPSA id w14-20020aa7954e000000b00686b649cdd0sm1969278pfq.86.2023.10.20.14.08.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 14:08:16 -0700 (PDT) From: Douglas Anderson <dianders@chromium.org> To: Jakub Kicinski <kuba@kernel.org>, Hayes Wang <hayeswang@realtek.com>, "David S . Miller" <davem@davemloft.net> Cc: Edward Hill <ecgh@chromium.org>, Laura Nao <laura.nao@collabora.com>, Alan Stern <stern@rowland.harvard.edu>, Simon Horman <horms@kernel.org>, linux-usb@vger.kernel.org, Grant Grundler <grundler@chromium.org>, Douglas Anderson <dianders@chromium.org>, =?utf-8?q?Bj=C3=B8rn_Mork?= <bjorn@mork.no>, Eric Dumazet <edumazet@google.com>, Paolo Abeni <pabeni@redhat.com>, Prashant Malani <pmalani@chromium.org>, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH v5 4/8] r8152: Release firmware if we have an error in probe Date: Fri, 20 Oct 2023 14:06:55 -0700 Message-ID: <20231020140655.v5.4.I5cd5dd190df0826e38444df217f63918a8b4ad39@changeid> X-Mailer: git-send-email 2.42.0.758.gaed0368e0e-goog In-Reply-To: <20231020210751.3415723-1-dianders@chromium.org> References: <20231020210751.3415723-1-dianders@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 20 Oct 2023 14:08:44 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780310213914957415 X-GMAIL-MSGID: 1780310213914957415 |
Series |
r8152: Avoid writing garbage to the adapter's registers
|
|
Commit Message
Doug Anderson
Oct. 20, 2023, 9:06 p.m. UTC
The error handling in rtl8152_probe() is missing a call to release
firmware. Add it in to match what's in the cleanup code in
rtl8152_disconnect().
Fixes: 9370f2d05a2a ("r8152: support request_firmware for RTL8153")
Signed-off-by: Douglas Anderson <dianders@chromium.org>
---
Changes in v5:
- ("Release firmware if we have an error in probe") new for v5.
drivers/net/usb/r8152.c | 1 +
1 file changed, 1 insertion(+)
Comments
On Fri, Oct 20, 2023 at 2:08 PM Douglas Anderson <dianders@chromium.org> wrote: > > The error handling in rtl8152_probe() is missing a call to release > firmware. Add it in to match what's in the cleanup code in > rtl8152_disconnect(). > > Fixes: 9370f2d05a2a ("r8152: support request_firmware for RTL8153") > Signed-off-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Grant Grundler <grundler@chromium.org> > --- > > Changes in v5: > - ("Release firmware if we have an error in probe") new for v5. > > drivers/net/usb/r8152.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c > index d10b0886b652..656fe90734fc 100644 > --- a/drivers/net/usb/r8152.c > +++ b/drivers/net/usb/r8152.c > @@ -9786,6 +9786,7 @@ static int rtl8152_probe(struct usb_interface *intf, > cancel_delayed_work_sync(&tp->hw_phy_work); > if (tp->rtl_ops.unload) > tp->rtl_ops.unload(tp); > + rtl8152_release_firmware(tp); > usb_set_intfdata(intf, NULL); > out: > free_netdev(netdev); > -- > 2.42.0.758.gaed0368e0e-goog >
On 10/20/2023 2:06 PM, Douglas Anderson wrote: > The error handling in rtl8152_probe() is missing a call to release > firmware. Add it in to match what's in the cleanup code in > rtl8152_disconnect(). > > Fixes: 9370f2d05a2a ("r8152: support request_firmware for RTL8153") > Signed-off-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index d10b0886b652..656fe90734fc 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -9786,6 +9786,7 @@ static int rtl8152_probe(struct usb_interface *intf, cancel_delayed_work_sync(&tp->hw_phy_work); if (tp->rtl_ops.unload) tp->rtl_ops.unload(tp); + rtl8152_release_firmware(tp); usb_set_intfdata(intf, NULL); out: free_netdev(netdev);