Skip to content
Commit a6b9ede1 authored by Dmitry Torokhov's avatar Dmitry Torokhov Committed by Lorenzo Pieralisi
Browse files

PCI: apple: Do not leak reset GPIO on unbind/unload/error

The driver allocates reset GPIO in apple_pcie_setup_port() but neither
releases the resource, nor uses devm API to have it released
automatically.

Let's fix this by switching to devm API. While at it let's use generic
devm_fwnode_gpiod_get() instead of OF-specific gpiod_get_from_of_node()
- this will allow us top stop exporting the latter down the road.

Link: https://lore.kernel.org/r/YxatO5OaI2RpxQ2M@google.com


Fixes: 1e33888f ("PCI: apple: Add initial hardware bring-up")
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: default avatarLorenzo Pieralisi <lpieralisi@kernel.org>
Reviewed-by: default avatarHector Martin <marcan@marcan.st>
Acked-by: default avatarMarc Zyngier <maz@kernel.org>
parent 568035b0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment