From: Jakub Kicinski <kuba@kernel•org>
To: admiyo@os•amperecomputing.com
Cc: Jeremy Kerr <jk@codeconstruct•com.au>,
Matt Johnston <matt@codeconstruct•com.au>,
Andrew Lunn <andrew+netdev@lunn•ch>,
"David S. Miller" <davem@davemloft•net>,
Eric Dumazet <edumazet@google•com>,
Paolo Abeni <pabeni@redhat•com>,
netdev@vger•kernel.org, linux-kernel@vger•kernel.org,
Sudeep Holla <sudeep.holla@arm•com>,
Jonathan Cameron <Jonathan.Cameron@huawei•com>,
Huisong Li <lihuisong@huawei•com>
Subject: Re: [PATCH v15 1/1] mctp pcc: Implement MCTP over PCC Transport
Date: Mon, 20 Jan 2025 14:43:27 -0800 [thread overview]
Message-ID: <20250120144327.4960793b@kernel.org> (raw)
In-Reply-To: <20250115195217.729071-2-admiyo@os.amperecomputing.com>
On Wed, 15 Jan 2025 14:52:17 -0500 admiyo@os•amperecomputing.com wrote:
> + rc = devm_add_action_or_reset(dev, mctp_cleanup_netdev, ndev);
> + if (rc)
> + goto cleanup_netdev;
devm_add_action_or_reset() calls the cleanup handler on failure,
so just
return devm_add_action_or_reset(dev, mctp_cleanup_netdev, ndev);
directly. As is you'll double free the netdev on failure.
> + return rc;
> +cleanup_netdev:
> + free_netdev(ndev);
--
pw-bot: cr
prev parent reply other threads:[~2025-01-20 22:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-15 19:52 [PATCH v15 0/1] MCTP Over PCC Transport admiyo
2025-01-15 19:52 ` [PATCH v15 1/1] mctp pcc: Implement MCTP over " admiyo
2025-01-20 22:43 ` Jakub Kicinski [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=20250120144327.4960793b@kernel.org \
--to=kuba@kernel$(echo .)org \
--cc=Jonathan.Cameron@huawei$(echo .)com \
--cc=admiyo@os$(echo .)amperecomputing.com \
--cc=andrew+netdev@lunn$(echo .)ch \
--cc=davem@davemloft$(echo .)net \
--cc=edumazet@google$(echo .)com \
--cc=jk@codeconstruct$(echo .)com.au \
--cc=lihuisong@huawei$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=matt@codeconstruct$(echo .)com.au \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
--cc=sudeep.holla@arm$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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