On Fri, May 16, 2025 at 09:16:13PM +0100, Simon Horman wrote:
On Thu, May 15, 2025 at 09:59:35PM +0200, Christophe JAILLET wrote:
quoted
If register_netdev() fails, the error handling path of the probe will not
free the memory allocated by the previous airoha_metadata_dst_alloc() call
because port->dev->reg_state will not be NETREG_REGISTERED.
So, an explicit airoha_metadata_dst_free() call is needed in this case to
avoid a memory leak.
Fixes: af3cf757d5c9 ("net: airoha: Move DSA tag in DMA descriptor")
Signed-off-by: Christophe JAILLET <redacted>
---
Changes in v3:
- None
Changes in v2:
- New patch
v2: https://lore.kernel.org/all/5c94b9b3850f7f29ed653e2205325620df28c3ff.1746715755.git.christophe.jaillet@wanadoo.fr/ (local)
Compile tested only.
Reviewed-by: Simon Horman <horms@kernel.org>
Sorry, I was a little too hasty.
This patch looks good to me, but as this is a fix for change
present in net it should be targeted at net.
Subject: [PATCH v4 net] ...
And it should be split out from the patchset comprising the remaining
patches in this series, which appear to be clean-ups (or at least not
but fixes). This rump patch-set should be targeted at net-next.
And ideally, IMHO, have a cover letter.
Subject: [PATCH v4 net-next 0/3] ...
Thanks!
--
pw-bot: changes-requested