Jianglei Nie 0a18d802d6 net: sfp: fix memory leak in sfp_probe()
sfp_probe() allocates a memory chunk from sfp with sfp_alloc(). When
devm_add_action() fails, sfp is not freed, which leads to a memory leak.

We should use devm_add_action_or_reset() instead of devm_add_action().

Signed-off-by: Jianglei Nie <niejianglei2021@163.com>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://lore.kernel.org/r/20220629075550.2152003-1-niejianglei2021@163.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2022-06-30 11:38:16 +02:00
..
2022-05-01 17:45:35 +01:00
2022-05-02 13:21:38 +02:00
2021-06-16 12:34:07 -07:00
2021-09-14 20:03:24 -07:00
2022-03-06 11:05:31 +00:00
2022-06-30 11:38:16 +02:00
2021-06-16 12:34:07 -07:00