Commit dd58f3c
KVM: fix error handling in svm_hardware_setup
rename svm_hardware_unsetup as svm_hardware_teardown, move
it before svm_hardware_setup, and call it to free all memory
if fail to setup in svm_hardware_setup, otherwise memory will
be leaked
remove __exit attribute for it since it is called in __init
function
Signed-off-by: Li RongQing <lirongqing@baidu.com>
Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>1 parent d80b64f commit dd58f3c
1 file changed
Lines changed: 20 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1349 | 1349 | | |
1350 | 1350 | | |
1351 | 1351 | | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
1352 | 1370 | | |
1353 | 1371 | | |
1354 | 1372 | | |
| |||
1462 | 1480 | | |
1463 | 1481 | | |
1464 | 1482 | | |
1465 | | - | |
1466 | | - | |
| 1483 | + | |
1467 | 1484 | | |
1468 | 1485 | | |
1469 | 1486 | | |
1470 | | - | |
1471 | | - | |
1472 | | - | |
1473 | | - | |
1474 | | - | |
1475 | | - | |
1476 | | - | |
1477 | | - | |
1478 | | - | |
1479 | | - | |
1480 | | - | |
1481 | | - | |
1482 | | - | |
1483 | | - | |
1484 | | - | |
1485 | | - | |
1486 | | - | |
1487 | | - | |
1488 | 1487 | | |
1489 | 1488 | | |
1490 | 1489 | | |
| |||
7385 | 7384 | | |
7386 | 7385 | | |
7387 | 7386 | | |
7388 | | - | |
| 7387 | + | |
7389 | 7388 | | |
7390 | 7389 | | |
7391 | 7390 | | |
| |||
0 commit comments