[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220407085911.2491719-1-lv.ruyi@zte.com.cn>
Date: Thu, 7 Apr 2022 08:59:11 +0000
From: cgel.zte@...il.com
To: jk@...abs.org, joel@....id.au
Cc: alistair@...ple.id.au, eajames@...ux.ibm.com,
linux-fsi@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
Lv Ruyi <lv.ruyi@....com.cn>, Zeal Robot <zealci@....com.cn>
Subject: [PATCH] fsi: master-ast-cf: Fix missing of_node_put in fsi_master_acf_probe
From: Lv Ruyi <lv.ruyi@....com.cn>
of_parse_phandle returns node pointer with refcount incremented, use
of_node_put() on it when done.
Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: Lv Ruyi <lv.ruyi@....com.cn>
---
drivers/fsi/fsi-master-ast-cf.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/fsi/fsi-master-ast-cf.c b/drivers/fsi/fsi-master-ast-cf.c
index 24292acdbaf8..5f608ef8b53c 100644
--- a/drivers/fsi/fsi-master-ast-cf.c
+++ b/drivers/fsi/fsi-master-ast-cf.c
@@ -1324,12 +1324,14 @@ static int fsi_master_acf_probe(struct platform_device *pdev)
}
master->cvic = devm_of_iomap(&pdev->dev, np, 0, NULL);
if (IS_ERR(master->cvic)) {
+ of_node_put(np);
rc = PTR_ERR(master->cvic);
dev_err(&pdev->dev, "Error %d mapping CVIC\n", rc);
goto err_free;
}
rc = of_property_read_u32(np, "copro-sw-interrupts",
&master->cvic_sw_irq);
+ of_node_put(np);
if (rc) {
dev_err(&pdev->dev, "Can't find coprocessor SW interrupt\n");
goto err_free;
--
2.25.1
Powered by blists - more mailing lists