Colin Ian King
8200597fb1
clk: vc5: fix use of memory after it has been kfree'd
...
There are a several places where printing an error message of
init.name occurs after init.name has been kfree'd. Also the failure
message is duplicated each time in the code. Fix this by adding
a registration error failure path for these cases, moving the
duplicated error messages to one common point and kfree'ing init.name
only after it has been used.
Changes also shrink the object code size by 171 bytes (x86-64, gcc 9.3):
Before:
text data bss dec hex filename
21057 3960 64 25081 61f9 drivers/clk/clk-versaclock5.o
After:
text data bss dec hex filename
20886 3960 64 24910 614e drivers/clk/clk-versaclock5.o
Addresses-Coverity: ("Use after free")
Fixes: f491276a5168 ("clk: vc5: Allow Versaclock driver to support multiple instances")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20200625132736.88832-1-colin.king@canonical.com
Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
[sboyd@kernel.org: Drop stray newline]
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2020-07-22 18:46:24 -07:00
..
2019-09-19 15:31:46 -07:00
2019-05-21 10:50:46 +02:00
2020-05-26 20:22:50 -07:00
2019-06-19 17:09:55 +02:00
2019-10-16 16:17:50 -07:00
2020-06-09 13:45:37 -07:00
2020-05-27 00:08:31 -07:00
2019-05-21 10:50:46 +02:00
2019-10-16 16:17:14 -07:00
2019-05-21 10:50:46 +02:00
2019-11-27 08:14:17 -08:00
2020-06-14 01:57:21 +09:00
2020-05-21 22:37:48 +08:00
2020-05-28 16:47:02 -07:00
2020-06-14 01:57:21 +09:00
2019-05-30 11:26:32 -07:00
2020-06-14 01:57:21 +09:00
2020-05-02 01:53:32 +02:00
2019-12-23 18:53:13 -08:00
2020-06-10 11:42:19 -07:00
2020-01-04 23:34:39 -08: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-11-13 15:01:17 -08:00
2020-06-10 11:42:19 -07:00
2020-05-18 11:06:33 +02:00
2020-04-13 09:35:24 +02:00
2020-05-19 16:58:42 +02:00
2019-05-30 16:33:37 -07:00
2019-08-16 10:20:07 -07:00
2020-05-26 19:13:05 -07:00
2019-09-06 10:27:40 -07:00
2020-06-10 11:42:19 -07:00
2020-05-27 01:14:06 -07:00
2020-04-14 09:21:05 +02:00
2020-02-12 19:01:16 +01:00
2020-06-10 11:42:19 -07:00
2020-06-14 01:57:21 +09:00
2020-01-04 23:14:22 -08:00
2020-01-04 23:27:15 -08:00
2020-06-14 01:57:21 +09:00
2020-05-28 16:00:33 -07:00
2019-08-16 10:20:15 -07:00
2019-06-05 17:37:13 +02:00
2020-06-10 11:42:19 -07:00
2020-04-13 12:20:06 -07:00
2019-11-26 10:02:48 -08:00
2019-09-06 15:17:02 -07:00
2020-05-27 01:36:22 -07:00
2019-05-30 11:29:19 -07:00
2019-06-19 17:09:55 +02:00
2020-01-24 07:22:47 +00:00
2019-12-24 00:10:33 -08: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
2020-01-28 13:26:48 -08: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
2020-01-07 23:08:02 -08: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
2020-01-06 23:07:34 -08:00
2019-05-15 13:21:37 -07:00
2020-01-28 13:26:48 -08:00
2020-01-06 23:10:12 -08:00
2018-06-06 11:15:43 -07:00
2020-01-05 13:34:36 -08:00
2019-06-05 17:36:37 +02:00
2019-05-30 11:29:52 -07:00
2020-05-28 21:06:39 -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
2020-01-06 23:10:05 -08: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
2020-02-03 23:03:49 -08:00
2019-07-17 10:07:48 -07:00
2020-05-07 10:47:27 +05:30
2019-07-15 20:18:40 -07:00
2018-11-06 09:42:12 -08:00
2019-12-24 11:36:46 +00: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
2020-05-28 21:00:51 -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
2020-07-22 18:46:24 -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
2020-06-10 11:42:19 -07:00
2019-07-12 11:00:14 -07:00
2019-06-19 17:09:55 +02:00
2020-06-14 01:57:21 +09:00
2020-06-10 11:42:19 -07:00