Re: [PATCH] net: mana: Fix possible double free in error handling path

From: Przemek Kitszel
Date: Mon Jun 24 2024 - 05:16:42 EST


On 6/24/24 05:21, Ma Ke wrote:
When auxiliary_device_add() returns error and then calls
auxiliary_device_uninit(), callback function adev_release

I would add () after function name

calls kfree(madev) to free memory. We shouldn't call kfree(padev)

there is no `padev` in the patch :)
"to free memory" part sounds redundant.

again in the error handling path.

Signed-off-by: Ma Ke <make24@xxxxxxxxxxx>

you need a Fixes: tag

---
drivers/net/ethernet/microsoft/mana/mana_en.c | 31 +++++++++----------
1 file changed, 14 insertions(+), 17 deletions(-)