Kishon Vijay Abraham I
8247470772
clk: Fix memory leak in clk_unregister()
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: 1df4046a93e0 ("clk: Combine __clk_get() and __clk_create_clk()")
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2019-11-19 14:18:02 -08:00
..
2019-09-19 15:31:46 -07:00
2019-05-21 10:50:46 +02:00
2019-09-20 15:45:07 -07:00
2019-06-19 17:09:55 +02:00
2019-05-21 10:50:46 +02:00
2019-09-19 15:31:46 -07:00
2019-05-21 10:50:46 +02:00
2019-08-07 15:25:45 -07:00
2019-05-21 10:50:46 +02:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:26:32 -07:00
2019-09-17 22:53:34 -07:00
2019-09-22 09:30:30 -07:00
2019-07-17 10:07:48 -07:00
2019-05-30 11:26:32 -07:00
2019-09-20 15:45:07 -07:00
2019-09-19 15:31:27 -07:00
2019-06-05 17:37:18 +02:00
2019-06-07 11:54:48 -07:00
2019-09-17 22:15:41 -07:00
2019-05-30 11:26:37 -07:00
2019-05-30 11:26:37 -07:00
2019-06-05 17:37:15 +02:00
2019-06-05 17:37:17 +02:00
2019-09-20 15:45:07 -07:00
2019-09-20 15:45:07 -07:00
2019-09-05 12:43:39 +02:00
2019-08-08 13:54:38 -07:00
2019-05-30 16:33:37 -07:00
2019-08-16 10:20:07 -07:00
2019-09-20 15:45:07 -07:00
2019-09-06 10:27:40 -07:00
2019-09-20 15:45:07 -07:00
2019-09-19 15:30:40 -07:00
2019-07-17 10:07:48 -07:00
2019-09-19 15:31:27 -07:00
2019-07-17 10:07:48 -07:00
2019-09-20 15:53:02 -07:00
2019-05-30 11:26:37 -07:00
2019-05-30 11:29:22 -07:00
2019-08-07 15:25:25 -07:00
2019-06-19 17:09:55 +02:00
2019-08-16 10:20:15 -07:00
2019-06-05 17:37:13 +02:00
2019-05-16 09:19:14 -07:00
2019-05-30 11:29:52 -07:00
2019-09-06 15:17:02 -07:00
2019-09-06 15:17:02 -07:00
2019-09-06 15:22:29 -07:00
2019-05-30 11:29:19 -07:00
2019-06-19 17:09:55 +02:00
2019-06-27 10:57:24 +01:00
2019-09-17 13:26:31 -07:00
2019-07-17 10:07:48 -07:00
2019-09-06 10:31:16 -07:00
2019-05-30 11:26:32 -07:00
2019-08-16 10:37:01 -07:00
2018-12-11 09:57:47 -08:00
2018-08-02 13:55:00 -07:00
2019-06-25 14:28:01 -07:00
2019-05-07 11:46:02 -07:00
2019-06-19 17:09:55 +02:00
2019-05-07 11:46:13 -07:00
2019-05-15 13:21:37 -07:00
2019-04-26 10:40:49 -07:00
2019-05-15 13:21:37 -07:00
2019-05-07 11:46:02 -07:00
2018-06-06 11:15:43 -07:00
2019-04-26 10:40:49 -07:00
2019-06-05 17:36:37 +02:00
2019-05-30 11:29:52 -07:00
2019-05-15 13:21:37 -07:00
2019-08-16 10:20:07 -07:00
2018-07-06 13:44:06 -07:00
2019-02-06 10:35:03 -08:00
2019-08-16 10:20:15 -07:00
2017-07-21 15:49:54 -07:00
2019-05-15 13:21:37 -07:00
2019-05-07 11:46:02 -07:00
2019-05-30 11:29:22 -07:00
2018-10-31 11:08:30 -07:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:29:52 -07:00
2018-11-06 09:41:44 -08:00
2019-07-17 10:07:48 -07:00
2019-08-07 14:17:49 -07:00
2019-07-15 20:18:40 -07:00
2018-11-06 09:42:12 -08:00
2019-08-12 12:23:01 +01:00
2019-05-30 11:29:52 -07:00
2019-05-30 11:26:37 -07:00
2019-06-27 13:45:38 -07:00
2019-05-30 11:26:37 -07:00
2019-08-07 14:23:24 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:29:52 -07:00
2018-08-30 09:50:20 -07:00
2019-04-29 11:13:23 -07:00
2018-08-30 09:50:20 -07:00
2019-06-05 17:37:07 +02:00
2019-05-30 11:29:22 -07:00
2019-05-30 11:26:37 -07:00
2019-06-05 17:36:37 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:35 -07:00
2019-11-19 14:18:02 -08:00
2019-07-12 11:00:14 -07:00
2019-06-19 17:09:55 +02:00
2019-09-17 10:27:57 -07:00
2019-09-06 15:22:29 -07:00