aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <[email protected]>2024-08-25 20:31:03 +0200
committerAlexandre Belloni <[email protected]>2024-09-12 00:33:33 +0200
commit73580e2ee6adfb40276bd420da3bb1abae204e10 (patch)
tree4aa7cedb5b0526d61ea5a9d3c1b35fe6e8d37991
parent80bf13c07c07c43cc959b253305b64922cb20a92 (diff)
rtc: at91sam9: fix OF node leak in probe() error path
Driver is leaking an OF node reference obtained from of_parse_phandle_with_fixed_args(). Fixes: 43e112bb3dea ("rtc: at91sam9: make use of syscon/regmap to access GPBR registers") Cc: [email protected] Signed-off-by: Krzysztof Kozlowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
-rw-r--r--drivers/rtc/rtc-at91sam9.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-at91sam9.c b/drivers/rtc/rtc-at91sam9.c
index f93bee96e362..993c0878fb66 100644
--- a/drivers/rtc/rtc-at91sam9.c
+++ b/drivers/rtc/rtc-at91sam9.c
@@ -368,6 +368,7 @@ static int at91_rtc_probe(struct platform_device *pdev)
return ret;
rtc->gpbr = syscon_node_to_regmap(args.np);
+ of_node_put(args.np);
rtc->gpbr_offset = args.args[0];
if (IS_ERR(rtc->gpbr)) {
dev_err(&pdev->dev, "failed to retrieve gpbr regmap, aborting.\n");