diff options
| author | Christophe JAILLET <[email protected]> | 2025-05-24 07:29:11 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2025-05-28 00:20:10 +0000 |
| commit | c59783780c8ad66f6076a9a7c74df3e006e29519 (patch) | |
| tree | 3404536fa6b3ef1e5304b9267285f2165fa640bc /drivers/net/mctp/mctp-usb.c | |
| parent | net: phy: clear phydev->devlink when the link is deleted (diff) | |
| download | kernel-c59783780c8ad66f6076a9a7c74df3e006e29519.tar.gz kernel-c59783780c8ad66f6076a9a7c74df3e006e29519.zip | |
net: airoha: Fix an error handling path in airoha_alloc_gdm_port()
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 <[email protected]>
Acked-by: Lorenzo Bianconi <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Link: https://patch.msgid.link/1b94b91345017429ed653e2f05d25620dc2823f9.1746715755.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'drivers/net/mctp/mctp-usb.c')
0 files changed, 0 insertions, 0 deletions
