scsi: bnx2i: add error handling for ioremap_nocache
authorZhouyang Jia <jiazhouyang09@gmail.com>
Tue, 12 Jun 2018 03:13:00 +0000 (11:13 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Oct 2018 00:00:52 +0000 (17:00 -0700)
commit13ab355240a9dc5be2ca9e5aba56932c64ee66ff
tree7ecfd93617cb94b0d39d4c709af41bc0c38f66af
parentd5963fae7f3691e58fe7eeb02bbcf6eaac981676
scsi: bnx2i: add error handling for ioremap_nocache

[ Upstream commit aa154ea885eb0c2407457ce9c1538d78c95456fa ]

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/bnx2i/bnx2i_hwi.c