Re: [PATCH] net: sfp: fix memory leak in sfp_probe()

From: Michael Walle
Date: Thu Jun 23 2022 - 03:20:41 EST


Hi,

> err = devm_add_action(sfp->dev, sfp_cleanup, sfp);
> - if (err < 0)
> + if (err < 0) {
> + sfp_cleanup(sfp);
> return err;
> + }

Better use devm_add_action_or_reset(), no?

-michael