Message ID | 1436254982-6505-1-git-send-email-jthumshirn@suse.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c index 53030b0..04a3205 100644 --- a/drivers/scsi/mvsas/mv_init.c +++ b/drivers/scsi/mvsas/mv_init.c @@ -339,8 +339,11 @@ int mvs_ioremap(struct mvs_info *mvi, int bar, int bar_ex) res_start = pci_resource_start(pdev, bar); res_len = pci_resource_len(pdev, bar); - if (!res_start || !res_len) + if (!res_start || !res_len) { + iounmap(mvi->regs_ex); + mvi->regs_ex = NULL; goto err_out; + } res_flag = pci_resource_flags(pdev, bar); if (res_flag & IORESOURCE_CACHEABLE)