* [PATCH] Input: sparcspkr add of_node_put()
@ 2018-11-21 13:28 Yangtao Li
2018-12-09 5:23 ` Frank Lee
0 siblings, 1 reply; 2+ messages in thread
From: Yangtao Li @ 2018-11-21 13:28 UTC (permalink / raw)
To: dmitry.torokhov; +Cc: linux-input, linux-kernel, Yangtao Li
of_find_node_by_path() acquires a reference to the node
returned by it and that reference needs to be dropped by its caller.
bl_idle_init() doesn't do that, so fix it.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
drivers/input/misc/sparcspkr.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/input/misc/sparcspkr.c b/drivers/input/misc/sparcspkr.c
index 4a5afc7fe96e..dc121fbbd3e1 100644
--- a/drivers/input/misc/sparcspkr.c
+++ b/drivers/input/misc/sparcspkr.c
@@ -205,11 +205,11 @@ static int bbc_beep_probe(struct platform_device *op)
info = &state->u.bbc;
info->clock_freq = of_getintprop_default(dp, "clock-frequency", 0);
if (!info->clock_freq)
- goto out_free;
+ goto out_put_node;
info->regs = of_ioremap(&op->resource[0], 0, 6, "bbc beep");
if (!info->regs)
- goto out_free;
+ goto out_put_node;
platform_set_drvdata(op, state);
@@ -217,11 +217,14 @@ static int bbc_beep_probe(struct platform_device *op)
if (err)
goto out_clear_drvdata;
+ of_node_put(dp);
+
return 0;
out_clear_drvdata:
of_iounmap(&op->resource[0], info->regs, 6);
-
+out_put_node:
+ of_node_put(dp);
out_free:
kfree(state);
out_err:
--
2.17.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Input: sparcspkr add of_node_put()
2018-11-21 13:28 [PATCH] Input: sparcspkr add of_node_put() Yangtao Li
@ 2018-12-09 5:23 ` Frank Lee
0 siblings, 0 replies; 2+ messages in thread
From: Frank Lee @ 2018-12-09 5:23 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: linux-input, linux-kernel
ping....
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-12-09 5:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-21 13:28 [PATCH] Input: sparcspkr add of_node_put() Yangtao Li
2018-12-09 5:23 ` Frank Lee
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.