On Tue, Oct 8, 2024 at 5:26 AM Jakub Kicinski <kuba@xxxxxxxxxx> wrote: > > 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. [Kalesh] I see. Thank you Kuba for the explanation. > -- > pw-bot: cr -- Regards, Kalesh A P
<<attachment: smime.p7s>>