mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-07 09:55:19 +02:00
rtc: at91sam9: fix OF node leak in probe() error path
commit73580e2ee6
upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
03582f4752
commit
cda7d59724
|
@ -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