File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -358,6 +358,9 @@ static int i10nm_get_hbm_munits(void)
358
358
359
359
mbase = ioremap (base + off , I10NM_HBM_IMC_MMIO_SIZE );
360
360
if (!mbase ) {
361
+ pci_dev_put (d -> imc [lmc ].mdev );
362
+ d -> imc [lmc ].mdev = NULL ;
363
+
361
364
i10nm_printk (KERN_ERR , "Failed to ioremap for hbm mc 0x%llx\n" ,
362
365
base + off );
363
366
return - ENOMEM ;
@@ -368,6 +371,12 @@ static int i10nm_get_hbm_munits(void)
368
371
369
372
mcmtr = I10NM_GET_MCMTR (& d -> imc [lmc ], 0 );
370
373
if (!I10NM_IS_HBM_IMC (mcmtr )) {
374
+ iounmap (d -> imc [lmc ].mbase );
375
+ d -> imc [lmc ].mbase = NULL ;
376
+ d -> imc [lmc ].hbm_mc = false;
377
+ pci_dev_put (d -> imc [lmc ].mdev );
378
+ d -> imc [lmc ].mdev = NULL ;
379
+
371
380
i10nm_printk (KERN_ERR , "This isn't an hbm mc!\n" );
372
381
return - ENODEV ;
373
382
}
You can’t perform that action at this time.
0 commit comments