scsi: bnx2i: add error handling for ioremap_nocache
When ioremap_nocache fails, the lack of error-handling code may cause unexpected results. This patch adds error-handling code after calling ioremap_nocache. Signed-off-by: Zhouyang Jia <jiazhouyang09@gmail.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Acked-by: Manish Rangankar <Manish.Rangankar@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Родитель
2da11d4262
Коммит
aa154ea885
|
@ -2727,6 +2727,8 @@ int bnx2i_map_ep_dbell_regs(struct bnx2i_endpoint *ep)
|
||||||
BNX2X_DOORBELL_PCI_BAR);
|
BNX2X_DOORBELL_PCI_BAR);
|
||||||
reg_off = (1 << BNX2X_DB_SHIFT) * (cid_num & 0x1FFFF);
|
reg_off = (1 << BNX2X_DB_SHIFT) * (cid_num & 0x1FFFF);
|
||||||
ep->qp.ctx_base = ioremap_nocache(reg_base + reg_off, 4);
|
ep->qp.ctx_base = ioremap_nocache(reg_base + reg_off, 4);
|
||||||
|
if (!ep->qp.ctx_base)
|
||||||
|
return -ENOMEM;
|
||||||
goto arm_cq;
|
goto arm_cq;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче