Commit 275bebf5 authored by Aleksandr Mishin's avatar Aleksandr Mishin Committed by Greg Kroah-Hartman
Browse files

fsl/fman: Save device references taken in mac_probe()



[ Upstream commit efeddd55 ]

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: default avatarAleksandr Mishin <amishin@t-argos.ru>
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
Stable-dep-of: 1dec67e0 ("fsl/fman: Fix refcount handling of fman-related devices")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 06b52684
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment