linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: cdce925: release child device nodes
@ 2018-08-21 21:05 Alexey Khoroshilov
  2018-08-30 22:20 ` Stephen Boyd
  0 siblings, 1 reply; 2+ messages in thread
From: Alexey Khoroshilov @ 2018-08-21 21:05 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd
  Cc: Alexey Khoroshilov, linux-clk, linux-kernel, ldv-project

of_get_child_by_name() returns device node with refcount incremented,
but there is no decrement in cdce925_probe(). The patch adds one.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
---
 drivers/clk/clk-cdce925.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clk/clk-cdce925.c b/drivers/clk/clk-cdce925.c
index 0a7e7d5a7506..e9c3ffad4ac3 100644
--- a/drivers/clk/clk-cdce925.c
+++ b/drivers/clk/clk-cdce925.c
@@ -703,6 +703,7 @@ static int cdce925_probe(struct i2c_client *client,
 				0x12 + (i*CDCE925_OFFSET_PLL),
 				0x07, value & 0x07);
 		}
+		of_node_put(np_output);
 	}
 
 	/* Register output clock Y1 */
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] clk: cdce925: release child device nodes
  2018-08-21 21:05 [PATCH] clk: cdce925: release child device nodes Alexey Khoroshilov
@ 2018-08-30 22:20 ` Stephen Boyd
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2018-08-30 22:20 UTC (permalink / raw)
  To: Alexey Khoroshilov, Michael Turquette
  Cc: Alexey Khoroshilov, linux-clk, linux-kernel, ldv-project

Quoting Alexey Khoroshilov (2018-08-21 14:05:32)
> of_get_child_by_name() returns device node with refcount incremented,
> but there is no decrement in cdce925_probe(). The patch adds one.
> 
> Found by Linux Driver Verification project (linuxtesting.org).
> 
> Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
> ---

Applied to clk-next


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-08-30 22:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-21 21:05 [PATCH] clk: cdce925: release child device nodes Alexey Khoroshilov
2018-08-30 22:20 ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).