Re: sata_mv: Another source code review around exception handling?

Tejun Heo
2015-12-28T16:10:54Z

Hello,

On Fri, Dec 25, 2015 at 05:00:30PM +0100, SF Markus Elfring wrote:
> The value "-ENOMEM" will be returned if one of these function calls failed.
> Can it be that any system resources (like memory) are not appropriately
> released if any calls of this sequence succeeded before the failure?

Most of those are managed resources (devm_, pcim_ and so on) and are
released automatically when the driver detaches from the device.

> Is the use of the single jump label "err" also suspicious here?

And that exit label deal with resources which aren't managed - some
just haven't grown managed variant yet while others don't fit the
model too well.

Thanks.

--
tejun