mirror of
https://github.com/torvalds/linux.git
synced 2024-11-21 19:46:16 +00:00
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: 43e112bb3d
("rtc: at91sam9: make use of syscon/regmap to access GPBR registers")
Cc: stable@vger.kernel.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240825183103.102904-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
This commit is contained in:
parent
80bf13c07c
commit
73580e2ee6
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user