diff options
author | Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> | 2024-12-05 19:30:14 +0900 |
---|---|---|
committer | Damien Le Moal <dlemoal@kernel.org> | 2024-12-09 09:06:58 +0900 |
commit | 676fe1f6f74db988191dab5df3bf256908177072 (patch) | |
tree | 2c5750b3b4d85122f8affbd5d4ff05b6334c6408 | |
parent | fac04efc5c793dccbd07e2d59af9f90b7fc0dca4 (diff) | |
download | linux-for-6.13-fixes.tar.gz |
ata: sata_highbank: fix OF node reference leak in highbank_initialize_phys()ata-6.13-rc3for-6.13-fixes
The OF node reference obtained by of_parse_phandle_with_args() is not
released on early return. Add a of_node_put() call before returning.
Fixes: 8996b89d6bc9 ("ata: add platform driver for Calxeda AHCI controller")
Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
-rw-r--r-- | drivers/ata/sata_highbank.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/ata/sata_highbank.c b/drivers/ata/sata_highbank.c index b1b40e9551deda..c8c817c51230a7 100644 --- a/drivers/ata/sata_highbank.c +++ b/drivers/ata/sata_highbank.c @@ -348,6 +348,7 @@ static int highbank_initialize_phys(struct device *dev, void __iomem *addr) phy_nodes[phy] = phy_data.np; cphy_base[phy] = of_iomap(phy_nodes[phy], 0); if (cphy_base[phy] == NULL) { + of_node_put(phy_data.np); return 0; } phy_count += 1; |