Commit 485534b
iommu/amd: Remove conditions from domain free paths
Don't use tlb as some flag to indicate if protection_domain_alloc()
completed. Have protection_domain_alloc() unwind itself in the normal
kernel style and require protection_domain_free() only be called on
successful results of protection_domain_alloc().
Also, the amd_iommu_domain_free() op is never called by the core code with
a NULL argument, so remove all the NULL tests as well.
Reviewed-by: Vasant Hegde <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Joerg Roedel <[email protected]>1 parent 9ac0b33 commit 485534b
1 file changed
+10
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2253 | 2253 | | |
2254 | 2254 | | |
2255 | 2255 | | |
2256 | | - | |
2257 | | - | |
2258 | | - | |
2259 | 2256 | | |
2260 | | - | |
2261 | | - | |
2262 | | - | |
2263 | | - | |
2264 | | - | |
2265 | | - | |
2266 | | - | |
| 2257 | + | |
| 2258 | + | |
2267 | 2259 | | |
2268 | 2260 | | |
2269 | 2261 | | |
| |||
2279 | 2271 | | |
2280 | 2272 | | |
2281 | 2273 | | |
2282 | | - | |
| 2274 | + | |
2283 | 2275 | | |
2284 | 2276 | | |
2285 | 2277 | | |
| |||
2302 | 2294 | | |
2303 | 2295 | | |
2304 | 2296 | | |
2305 | | - | |
| 2297 | + | |
2306 | 2298 | | |
2307 | 2299 | | |
2308 | 2300 | | |
| |||
2313 | 2305 | | |
2314 | 2306 | | |
2315 | 2307 | | |
2316 | | - | |
| 2308 | + | |
2317 | 2309 | | |
2318 | 2310 | | |
2319 | 2311 | | |
2320 | 2312 | | |
2321 | 2313 | | |
2322 | | - | |
| 2314 | + | |
2323 | 2315 | | |
2324 | 2316 | | |
2325 | | - | |
2326 | | - | |
| 2317 | + | |
| 2318 | + | |
| 2319 | + | |
| 2320 | + | |
2327 | 2321 | | |
2328 | 2322 | | |
2329 | 2323 | | |
| |||
2412 | 2406 | | |
2413 | 2407 | | |
2414 | 2408 | | |
2415 | | - | |
2416 | | - | |
2417 | | - | |
2418 | 2409 | | |
2419 | 2410 | | |
2420 | 2411 | | |
| |||
0 commit comments