From: Kohei Enju <kohei@enjuk.jp>
To: Matt Vollrath <tactii@gmail.com>
Cc: intel-wired-lan@osuosl.org
Subject: Re: [Intel-wired-lan] [PATCH net] i40e: Cleanup PTP pins on probe failure
Date: Tue, 7 Apr 2026 22:26:09 +0900 [thread overview]
Message-ID: <adUDfCHA-xewMp3k@x1> (raw)
In-Reply-To: <20260406035130.2255713-1-tactii@gmail.com>
On 04/05 23:51, Matt Vollrath wrote:
> --- a/drivers/net/ethernet/intel/i40e/i40e_ptp.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_ptp.c
> @@ -940,12 +940,15 @@ int i40e_ptp_hwtstamp_get(struct net_device *netdev,
> *
> * Release memory allocated for PTP pins.
> **/
> -static void i40e_ptp_free_pins(struct i40e_pf *pf)
> +void i40e_ptp_free_pins(struct i40e_pf *pf)
> {
> if (i40e_is_ptp_pin_dev(&pf->hw)) {
> - kfree(pf->ptp_pins);
> - kfree(pf->ptp_caps.pin_config);
> + if (pf->ptp_pins)
Not a big deal, but I don't think this guard is necessary, because kfree
accepts NULL safely.
> + kfree(pf->ptp_pins);
> + if (pf->ptp_caps.pin_config)
Same here.
Thank you for addressing!
> + kfree(pf->ptp_caps.pin_config);
> pf->ptp_pins = NULL;
> + pf->ptp_caps.pin_config = NULL;
> }
> }
>
> --
> 2.43.0
>
prev parent reply other threads:[~2026-04-07 13:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-06 3:51 [Intel-wired-lan] [PATCH net] i40e: Cleanup PTP pins on probe failure Matt Vollrath
2026-04-07 13:26 ` Kohei Enju [this message]
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=adUDfCHA-xewMp3k@x1 \
--to=kohei@enjuk.jp \
--cc=intel-wired-lan@osuosl.org \
--cc=tactii@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.