File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1385,9 +1385,13 @@ static int vmbus_bus_init(void)
1385
1385
hv_panic_page = (void * )hv_alloc_hyperv_zeroed_page ();
1386
1386
if (hv_panic_page ) {
1387
1387
ret = kmsg_dump_register (& hv_kmsg_dumper );
1388
- if (ret )
1388
+ if (ret ) {
1389
1389
pr_err ("Hyper-V: kmsg dump register "
1390
1390
"error 0x%x\n" , ret );
1391
+ hv_free_hyperv_page (
1392
+ (unsigned long )hv_panic_page );
1393
+ hv_panic_page = NULL ;
1394
+ }
1391
1395
} else
1392
1396
pr_err ("Hyper-V: panic message page memory "
1393
1397
"allocation failed" );
@@ -1416,7 +1420,6 @@ static int vmbus_bus_init(void)
1416
1420
hv_remove_vmbus_irq ();
1417
1421
1418
1422
bus_unregister (& hv_bus );
1419
- hv_free_hyperv_page ((unsigned long )hv_panic_page );
1420
1423
unregister_sysctl_table (hv_ctl_table_hdr );
1421
1424
hv_ctl_table_hdr = NULL ;
1422
1425
return ret ;
You can’t perform that action at this time.
0 commit comments