Commit ad57f1ab authored by Zhouyang Jia's avatar Zhouyang Jia Committed by Kleber Sacilotto de Souza

scsi: bnx2i: add error handling for ioremap_nocache

BugLink: https://bugs.launchpad.net/bugs/1798770

[ Upstream commit aa154ea8 ]

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: default avatarZhouyang Jia <jiazhouyang09@gmail.com>
Reviewed-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
Acked-by: default avatarManish Rangankar <Manish.Rangankar@cavium.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 0fa38eb9
......@@ -2742,6 +2742,8 @@ int bnx2i_map_ep_dbell_regs(struct bnx2i_endpoint *ep)
BNX2X_DOORBELL_PCI_BAR);
reg_off = (1 << BNX2X_DB_SHIFT) * (cid_num & 0x1FFFF);
ep->qp.ctx_base = ioremap_nocache(reg_base + reg_off, 4);
if (!ep->qp.ctx_base)
return -ENOMEM;
goto arm_cq;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment