Re: [PATCH net-next v3] eth: fbnic: Add hardware monitoring support via HWMON interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux