Kishon Vijay Abraham I
5f17dcfa6d
clk: Fix memory leak in clk_unregister()
commit 8247470772 upstream.
Memory allocated in alloc_clk() for 'struct clk' and
'const char *con_id' while invoking clk_register() is never freed
in clk_unregister(), resulting in kmemleak showing the following
backtrace.
backtrace:
[<00000000546f5dd0>] kmem_cache_alloc+0x18c/0x270
[<0000000073a32862>] alloc_clk+0x30/0x70
[<0000000082942480>] __clk_register+0xc8/0x760
[<000000005c859fca>] devm_clk_register+0x54/0xb0
[<00000000868834a8>] 0xffff800008c60950
[<00000000d5a80534>] platform_drv_probe+0x50/0xa0
[<000000001b3889fc>] really_probe+0x108/0x348
[<00000000953fa60a>] driver_probe_device+0x58/0x100
[<0000000008acc17c>] device_driver_attach+0x6c/0x90
[<0000000022813df3>] __driver_attach+0x84/0xc8
[<00000000448d5443>] bus_for_each_dev+0x74/0xc8
[<00000000294aa93f>] driver_attach+0x20/0x28
[<00000000e5e52626>] bus_add_driver+0x148/0x1f0
[<000000001de21efc>] driver_register+0x60/0x110
[<00000000af07c068>] __platform_driver_register+0x40/0x48
[<0000000060fa80ee>] 0xffff800008c66020
Fix it here.
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Link: https://lkml.kernel.org/r/20191022071153.21118-1-kishon@ti.com
Fixes: 1df4046a93 ("clk: Combine __clk_get() and __clk_create_clk()")
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-17 19:48:49 +01:00
..
2020-01-09 10:20:02 +01:00
2019-10-23 06:26:33 -04:00
2019-12-17 19:55:33 +01:00
2020-01-09 10:19:59 +01:00
2019-09-25 13:54:45 +02:00
2019-09-17 16:22:26 -07:00
2019-12-31 16:45:39 +01:00
2019-09-13 16:44:49 +03:00
2020-01-09 10:20:07 +01:00
2020-01-09 10:20:04 +01:00
2020-01-12 12:21:27 +01:00
2020-01-04 19:18:25 +01:00
2020-01-14 20:08:21 +01:00
2020-01-17 19:48:49 +01:00
2020-01-09 10:19:59 +01:00
2019-12-31 16:45:26 +01:00
2019-12-17 19:56:23 +01:00
2020-01-17 19:48:46 +01:00
2020-01-17 19:48:22 +01:00
2020-01-09 10:20:00 +01:00
2019-12-21 11:04:48 +01:00
2019-12-31 16:45:16 +01:00
2019-12-31 16:44:04 +01:00
2020-01-09 10:20:06 +01:00
2020-01-12 12:21:16 +01:00
2019-09-18 11:14:31 -07:00
2019-12-31 16:45:09 +01:00
2020-01-17 19:48:22 +01:00
2020-01-17 19:48:23 +01:00
2020-01-17 19:48:15 +01:00
2019-09-22 12:02:21 -07:00
2020-01-04 19:18:21 +01:00
2019-10-28 18:46:55 -07:00
2019-12-31 16:46:09 +01:00
2020-01-17 19:48:17 +01:00
2020-01-17 19:48:48 +01:00
2020-01-17 19:48:40 +01:00
2020-01-14 20:08:24 +01:00
2019-12-17 19:55:39 +01:00
2020-01-17 19:48:20 +01:00
2020-01-04 19:17:22 +01:00
2019-10-28 13:33:41 -07:00
2020-01-04 19:17:05 +01:00
2019-09-05 13:17:01 -06:00
2019-10-21 02:05:21 +02:00
2020-01-04 19:18:30 +01:00
2020-01-09 10:19:48 +01:00
2020-01-09 10:20:05 +01:00
2019-10-09 11:08:03 +02:00
2019-10-24 08:49:25 +01:00
2020-01-17 19:48:42 +01:00
2020-01-04 19:19:19 +01:00
2020-01-17 19:48:19 +01:00
2020-01-17 19:48:28 +01:00
2019-12-31 16:41:49 +01:00
2019-09-23 17:20:40 -04:00
2020-01-04 19:18:12 +01:00
2020-01-09 10:19:43 +01:00
2019-12-31 16:44:42 +01:00
2020-01-09 10:20:03 +01:00
2019-10-23 10:58:44 +05:30
2019-10-14 21:44:26 +02:00
2019-12-31 16:45:25 +01:00
2020-01-17 19:48:22 +01:00
2019-09-28 08:14:15 -07:00
2020-01-12 12:21:38 +01:00
2020-01-17 19:48:16 +01:00
2020-01-17 19:48:20 +01:00
2020-01-17 19:48:43 +01:00
2019-12-31 16:44:12 +01:00
2020-01-14 20:08:18 +01:00
2020-01-04 19:18:48 +01:00
2019-11-08 18:38:06 +01:00
2020-01-12 12:21:34 +01:00
2019-09-22 10:55:08 -07:00
2020-01-17 19:48:29 +01:00
2020-01-14 20:08:37 +01:00
2020-01-17 19:48:16 +01:00
2020-01-17 19:48:27 +01:00
2020-01-17 19:48:45 +01:00
2019-12-13 08:42:40 +01:00
2019-12-31 16:45:11 +01:00
2020-01-12 12:21:34 +01:00
2019-09-13 17:23:18 +03:00
2020-01-14 20:08:36 +01:00
2020-01-04 19:18:17 +01:00
2019-09-25 17:51:41 -07:00
2019-12-13 08:43:21 +01:00
2019-12-04 22:30:50 +01:00
2020-01-14 20:08:33 +01:00
2019-09-18 11:14:31 -07:00
2020-01-14 20:08:38 +01:00
2019-12-21 11:04:48 +01:00
2020-01-04 19:19:18 +01:00
2019-12-17 19:56:42 +01:00
2019-10-10 14:50:32 +02:00
2019-12-17 19:55:56 +01:00
2019-10-10 15:35:41 +02:00
2020-01-09 10:20:03 +01:00
2020-01-09 10:19:51 +01:00
2019-09-18 11:05:34 -07:00
2019-09-18 11:05:34 -07:00