Brian Norris
f828b0bcac
clk: fix leak on devm_clk_bulk_get_all() unwind
clk_bulk_get_all() allocates an array of struct clk_bulk data for us
(unlike clk_bulk_get()), so we need to free it. Let's use the
clk_bulk_put_all() helper.
kmemleak complains, on an RK3399 Gru/Kevin system:
unreferenced object 0xffffff80045def00 (size 128):
comm "swapper/0", pid 1, jiffies 4294667682 (age 86.394s)
hex dump (first 32 bytes):
44 32 60 fe fe ff ff ff 00 00 00 00 00 00 00 00 D2`.............
48 32 60 fe fe ff ff ff 00 00 00 00 00 00 00 00 H2`.............
backtrace:
[<00000000742860d6>] __kmalloc+0x22c/0x39c
[<00000000b0493f2c>] clk_bulk_get_all+0x64/0x188
[<00000000325f5900>] devm_clk_bulk_get_all+0x58/0xa8
[<00000000175b9bc5>] dwc3_probe+0x8ac/0xb5c
[<000000009169e2f9>] platform_drv_probe+0x9c/0xbc
[<000000005c51e2ee>] really_probe+0x13c/0x378
[<00000000c47b1f24>] driver_probe_device+0x84/0xc0
[<00000000f870fcfb>] __device_attach_driver+0x94/0xb0
[<000000004d1b92ae>] bus_for_each_drv+0x8c/0xd8
[<00000000481d60c3>] __device_attach+0xc4/0x150
[<00000000a163bd36>] device_initial_probe+0x1c/0x28
[<00000000accb6bad>] bus_probe_device+0x3c/0x9c
[<000000001a199f89>] device_add+0x218/0x3cc
[<000000001bd84952>] of_device_add+0x40/0x50
[<000000009c658c29>] of_platform_device_create_pdata+0xac/0x100
[<0000000021c69ba4>] of_platform_bus_create+0x190/0x224
Fixes: f08c2e2865 ("clk: add managed version of clk_bulk_get_all")
Cc: Dong Aisheng <aisheng.dong@nxp.com>
Cc: stable@vger.kernel.org
Signed-off-by: Brian Norris <briannorris@chromium.org>
Link: https://lore.kernel.org/r/20210731025950.2238582-1-briannorris@chromium.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2021-07-31 00:53:38 -07:00
..
2021-07-05 14:08:24 -07:00
2021-07-07 13:30:01 -07:00
2021-07-10 09:22:44 -07:00
2021-06-30 15:51:09 -07:00
2021-07-07 13:22:59 -07:00
2021-07-09 12:05:33 -07:00
2021-07-05 14:08:24 -07:00
2021-07-10 09:46:20 -07:00
2021-06-30 15:34:19 -06:00
2021-07-10 09:22:44 -07:00
2021-07-31 00:53:38 -07:00
2021-07-01 13:26:16 -07:00
2021-07-05 14:01:53 -07:00
2021-07-01 14:25:43 +02:00
2021-06-30 14:56:51 +02:00
2021-07-10 09:22:44 -07:00
2021-06-29 10:53:48 -07:00
2021-06-24 10:37:35 +09:00
2021-07-05 13:51:41 -07:00
2021-07-02 12:08:10 -07:00
2021-07-05 13:42:16 -07:00
2021-07-05 13:42:16 -07:00
2021-07-10 09:46:20 -07:00
2021-06-24 15:45:11 +02:00
2021-07-05 12:10:34 -07:00
2021-07-08 12:28:15 -07:00
2021-06-30 09:15:15 +02:00
2021-07-02 12:08:10 -07:00
2021-07-05 13:42:16 -07:00
2021-07-05 13:42:16 -07:00
2021-07-04 11:47:18 -07:00
2021-07-10 11:53:06 -07:00
2021-07-05 14:01:53 -07:00
2021-07-03 11:13:22 -07:00
2021-07-09 10:19:13 -07:00
2021-07-10 09:46:20 -07:00
2021-07-05 14:08:24 -07:00
2021-07-09 15:35:13 +02:00
2021-07-05 14:08:24 -07:00
2021-07-03 11:57:42 -07:00
2021-06-26 12:06:48 -05:00
2021-06-24 15:56:25 +02:00
2021-06-30 18:19:39 -07:00
2021-07-05 13:51:41 -07:00
2021-06-30 12:12:56 -07:00
2021-06-22 23:00:01 -04:00
2021-07-05 13:51:41 -07:00
2021-07-05 14:08:24 -07:00
2021-07-09 12:05:33 -07:00
2021-07-09 10:10:47 -07:00
2021-07-10 09:22:44 -07:00
2021-07-04 11:55:13 -07:00
2021-07-09 12:05:33 -07:00
2021-07-05 13:42:16 -07:00
2021-07-03 10:54:08 -07:00
2021-07-01 11:06:04 -07:00
2021-07-10 11:57:57 -07:00
2021-07-05 14:16:22 -07:00
2021-07-01 16:57:14 -07:00
2021-07-05 13:51:41 -07:00
2021-07-05 13:42:16 -07:00
2021-07-07 13:17:48 -07:00
2021-06-29 11:29:37 -07:00
2021-07-07 21:43:32 +02:00
2021-07-05 12:10:34 -07:00
2021-07-07 10:50:03 -07:00
2021-07-10 09:46:20 -07:00
2021-07-10 16:19:10 -07:00
2021-07-10 10:46:14 -07:00
2021-07-11 10:59:53 -07:00
2021-06-24 15:46:34 +02:00
2021-07-10 09:46:20 -07:00
2021-07-05 13:42:16 -07:00
2021-06-25 14:08:26 +01:00
2021-06-25 10:02:05 +02:00
2021-07-05 14:08:24 -07:00
2021-07-09 12:05:33 -07:00
2021-06-28 20:03:38 -07:00
2021-07-10 11:43:25 -07:00
2021-07-05 14:16:22 -07:00
2021-07-09 10:19:13 -07:00
2021-07-05 14:16:22 -07:00
2021-07-08 07:49:02 -04:00
2021-07-03 11:49:33 -07:00
2021-07-08 07:49:01 -04:00
2021-07-09 10:19:13 -07:00
2021-06-24 15:48:27 +02:00
2021-07-09 11:06:29 -07:00
2021-07-07 12:57:46 -07:00
2021-07-07 11:07:13 -07:00
2021-06-29 11:21:35 -07:00