Commit 949134e
pinctrl: pinctrl-pic32: Fix resource leak
[ Upstream commit fe55606 ]
Fix three possible resource leaks by using the devres version of
clk_prepare_enable(). Also, update error message accordingly.
Detected by Smatch:
drivers/pinctrl/pinctrl-pic32.c:2211 pic32_pinctrl_probe() warn:
'pctl->clk' from clk_prepare_enable() not released on lines: 2208.
drivers/pinctrl/pinctrl-pic32.c:2274 pic32_gpio_probe() warn:
'bank->clk' from clk_prepare_enable() not released on lines: 2264,2272.
Fixes: 2ba384e ("pinctrl: pinctrl-pic32: Add PIC32 pin control driver")
Signed-off-by: Ethan Tidmore <ethantidmore06@gmail.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent e567fe2 commit 949134e
1 file changed
Lines changed: 4 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2174 | 2174 | | |
2175 | 2175 | | |
2176 | 2176 | | |
2177 | | - | |
| 2177 | + | |
2178 | 2178 | | |
2179 | 2179 | | |
2180 | | - | |
2181 | | - | |
2182 | | - | |
2183 | | - | |
2184 | | - | |
2185 | | - | |
2186 | | - | |
| 2180 | + | |
2187 | 2181 | | |
2188 | 2182 | | |
2189 | 2183 | | |
| |||
2239 | 2233 | | |
2240 | 2234 | | |
2241 | 2235 | | |
2242 | | - | |
| 2236 | + | |
2243 | 2237 | | |
2244 | 2238 | | |
2245 | | - | |
2246 | | - | |
2247 | | - | |
2248 | | - | |
2249 | | - | |
2250 | | - | |
2251 | | - | |
| 2239 | + | |
2252 | 2240 | | |
2253 | 2241 | | |
2254 | 2242 | | |
| |||
0 commit comments