Commit 1c67f9c
net: pse-pd: pd692x0: Fix power budget leak in manager setup error path
Fix a resource leak where manager power budgets were freed on both
success and error paths during manager setup. Power budgets should
only be freed on error paths after regulator registration or during
driver removal.
Refactor cleanup logic by extracting OF node cleanup and power budget
freeing into separate helper functions for better maintainability.
Fixes: 3597540 ("net: pse-pd: pd692x0: Add support for PSE PI priority feature")
Signed-off-by: Kory Maincent <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>1 parent 8c5d959 commit 1c67f9c
1 file changed
+44
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1162 | 1162 | | |
1163 | 1163 | | |
1164 | 1164 | | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
1165 | 1197 | | |
1166 | 1198 | | |
1167 | 1199 | | |
1168 | 1200 | | |
1169 | 1201 | | |
1170 | | - | |
| 1202 | + | |
1171 | 1203 | | |
1172 | 1204 | | |
1173 | 1205 | | |
| |||
1185 | 1217 | | |
1186 | 1218 | | |
1187 | 1219 | | |
1188 | | - | |
| 1220 | + | |
1189 | 1221 | | |
1190 | 1222 | | |
1191 | 1223 | | |
1192 | | - | |
| 1224 | + | |
1193 | 1225 | | |
1194 | 1226 | | |
1195 | 1227 | | |
1196 | | - | |
| 1228 | + | |
1197 | 1229 | | |
1198 | 1230 | | |
1199 | 1231 | | |
1200 | | - | |
| 1232 | + | |
1201 | 1233 | | |
1202 | | - | |
1203 | | - | |
1204 | | - | |
1205 | | - | |
1206 | | - | |
1207 | | - | |
| 1234 | + | |
| 1235 | + | |
1208 | 1236 | | |
1209 | | - | |
1210 | | - | |
1211 | | - | |
1212 | | - | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
1213 | 1241 | | |
1214 | 1242 | | |
1215 | 1243 | | |
| |||
1748 | 1776 | | |
1749 | 1777 | | |
1750 | 1778 | | |
| 1779 | + | |
1751 | 1780 | | |
1752 | 1781 | | |
1753 | 1782 | | |
| |||
0 commit comments