[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241007165611.3ee5bc73@kernel.org>
Date: Mon, 7 Oct 2024 16:56:11 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Kalesh Anakkur Purayil <kalesh-anakkur.purayil@...adcom.com>
Cc: Sanman Pradhan <sanman.p211993@...il.com>, netdev@...r.kernel.org,
alexanderduyck@...com, kernel-team@...a.com, davem@...emloft.net,
edumazet@...gle.com, pabeni@...hat.com, jdelvare@...e.com,
linux@...ck-us.net, horms@...nel.org, mohsin.bashr@...il.com,
sanmanpradhan@...a.com, andrew@...n.ch, linux-hwmon@...r.kernel.org
Subject: Re: [PATCH net-next v3] eth: fbnic: Add hardware monitoring support
via HWMON interface
On Sat, 5 Oct 2024 09:53:30 +0530 Kalesh Anakkur Purayil wrote:
> [Kalesh] You should change this label to "hwmon_unregister" as you
> should unregister hwmon in case of failure here.
Not really, but you're right that there's a problem with the error path
here..
> > @@ -297,7 +299,7 @@ static int fbnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
> > netdev = fbnic_netdev_alloc(fbd);
> > if (!netdev) {
> > dev_err(&pdev->dev, "Netdev allocation failed\n");
> > - goto init_failure_mode;
> > + goto hwmon_unregister;
> > }
.. I don't think we should unregister HWMON if netdev alloc fails.
We will enter "init failure mode" (IFM), and leave the driver bound.
HWMON interface can remain registered, just like devlink and other
auxiliary interfaces.
--
pw-bot: cr
Powered by blists - more mailing lists