Repository navigation
Commit d3c7315
regulator: plug of_node leak in regulator_register()'s error path
By calling device_initialize() earlier and noting that kfree(NULL) is
ok, we can save a bit of code in error handling and plug of_node leak.
Fixed commit already did part of the work.
Fixes: 9177514 ("regulator: fix memory leak on error path of regulator_register()")
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Reviewed-by: Vladimir Zapolskiy <vz@mleia.com>
Acked-by: Vladimir Zapolskiy <vz@mleia.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/f5035b1b4d40745e66bacd571bbbb5e4644d21a1.1597195321.git.mirq-linux@rere.qmqm.pl
Signed-off-by: Mark Brown <broonie@kernel.org>1 parent 5c06540 commit d3c7315
1 file changed
Lines changed: 4 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5167 | 5167 | | |
5168 | 5168 | | |
5169 | 5169 | | |
| 5170 | + | |
5170 | 5171 | | |
5171 | 5172 | | |
5172 | 5173 | | |
5173 | 5174 | | |
5174 | 5175 | | |
5175 | 5176 | | |
5176 | 5177 | | |
5177 | | - | |
5178 | 5178 | | |
5179 | | - | |
| 5179 | + | |
5180 | 5180 | | |
5181 | 5181 | | |
5182 | 5182 | | |
| |||
5188 | 5188 | | |
5189 | 5189 | | |
5190 | 5190 | | |
5191 | | - | |
5192 | | - | |
5193 | 5191 | | |
5194 | | - | |
| 5192 | + | |
5195 | 5193 | | |
5196 | 5194 | | |
5197 | 5195 | | |
| |||
5244 | 5242 | | |
5245 | 5243 | | |
5246 | 5244 | | |
5247 | | - | |
5248 | 5245 | | |
5249 | 5246 | | |
5250 | 5247 | | |
| |||
5322 | 5319 | | |
5323 | 5320 | | |
5324 | 5321 | | |
5325 | | - | |
5326 | | - | |
5327 | 5322 | | |
5328 | 5323 | | |
5329 | 5324 | | |
5330 | | - | |
5331 | 5325 | | |
| 5326 | + | |
5332 | 5327 | | |
5333 | 5328 | | |
5334 | 5329 | | |
| |||
0 commit comments