sata_mv: Another source code review around exception handling?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I have looked at the source file for the Marvell SATA support driver once more.
I would appreciate if a specific implementation detail can be clarified there.

Static source code analysis can point out that functions like the following
are called by the mv_platform_probe() function.
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/drivers/ata/sata_mv.c?id=80c75a0f1d81922bf322c0634d1e1a15825a89e6#n4055

* ata_host_alloc_pinfo
  http://lxr.free-electrons.com/source/drivers/ata/libata-core.c?v=4.3#L5768

* devm_kzalloc
  http://lxr.free-electrons.com/source/include/linux/device.h?v=4.3#L645


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?


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

Regards,
Markus
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux