netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Kalesh Anakkur Purayil <kalesh-anakkur.purayil@broadcom.com>
Cc: Sanman Pradhan <sanman.p211993@gmail.com>,
	netdev@vger.kernel.org, alexanderduyck@fb.com,
	kernel-team@meta.com, davem@davemloft.net, edumazet@google.com,
	pabeni@redhat.com, jdelvare@suse.com, linux@roeck-us.net,
	horms@kernel.org, mohsin.bashr@gmail.com, sanmanpradhan@meta.com,
	andrew@lunn.ch, linux-hwmon@vger.kernel.org
Subject: Re: [PATCH net-next v3] eth: fbnic: Add hardware monitoring support via HWMON interface
Date: Mon, 7 Oct 2024 16:56:11 -0700	[thread overview]
Message-ID: <20241007165611.3ee5bc73@kernel.org> (raw)
In-Reply-To: <CAH-L+nO6U12TRCUWNxjAFTSwaMfeadt+iHYtYFZHVJFOZH0sdw@mail.gmail.com>

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

  reply	other threads:[~2024-10-07 23:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-04 20:49 [PATCH net-next v3] eth: fbnic: Add hardware monitoring support via HWMON interface Sanman Pradhan
2024-10-05  4:23 ` Kalesh Anakkur Purayil
2024-10-07 23:56   ` Jakub Kicinski [this message]
2024-10-08  3:20     ` Kalesh Anakkur Purayil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241007165611.3ee5bc73@kernel.org \
    --to=kuba@kernel.org \
    --cc=alexanderduyck@fb.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jdelvare@suse.com \
    --cc=kalesh-anakkur.purayil@broadcom.com \
    --cc=kernel-team@meta.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=mohsin.bashr@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sanman.p211993@gmail.com \
    --cc=sanmanpradhan@meta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).