]> www.infradead.org Git - users/hch/dma-mapping.git/commit
fsl/fman: Save device references taken in mac_probe()
authorAleksandr Mishin <amishin@t-argos.ru>
Tue, 15 Oct 2024 06:01:21 +0000 (09:01 +0300)
committerPaolo Abeni <pabeni@redhat.com>
Mon, 21 Oct 2024 08:50:16 +0000 (10:50 +0200)
commitefeddd552ec6767e4c8884caa516ac80b65f8823
tree0d37b36ef53ea40ad784cf2a9cc68860d03a0b0f
parent3b05b9c36ddd01338e1352588f2ec1ea23f97d43
fsl/fman: Save device references taken in mac_probe()

In mac_probe() there are calls to of_find_device_by_node() which takes
references to of_dev->dev. These references are not saved and not released
later on error path in mac_probe() and in mac_remove().

Add new fields into mac_device structure to save references taken for
future use in mac_probe() and mac_remove().

This is a preparation for further reference leaks fix.

Signed-off-by: Aleksandr Mishin <amishin@t-argos.ru>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/freescale/fman/mac.c
drivers/net/ethernet/freescale/fman/mac.h