[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220623072023.3637671-1-michael@walle.cc>
Date: Thu, 23 Jun 2022 09:20:23 +0200
From: Michael Walle <michael@...le.cc>
To: niejianglei2021@....com
Cc: andrew@...n.ch, davem@...emloft.net, edumazet@...gle.com,
hkallweit1@...il.com, kuba@...nel.org,
linux-kernel@...r.kernel.org, linux@...linux.org.uk,
netdev@...r.kernel.org, pabeni@...hat.com,
Michael Walle <michael@...le.cc>
Subject: Re: [PATCH] net: sfp: fix memory leak in sfp_probe()
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
Powered by blists - more mailing lists