[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <MW2PR07MB404280BA7B708DE79A5A07C4E37F0@MW2PR07MB4042.namprd07.prod.outlook.com>
Date: Tue, 12 Jun 2018 07:50:42 +0000
From: "Rangankar, Manish" <Manish.Rangankar@...ium.com>
To: Zhouyang Jia <jiazhouyang09@...il.com>
CC: Dept-Eng QLogic Storage Upstream
<QLogic-Storage-Upstream@...ium.com>,
"James E.J. Bottomley" <jejb@...ux.vnet.ibm.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] scsi: bnx2i: add error handling for ioremap_nocache
> -----Original Message-----
> From: Zhouyang Jia <jiazhouyang09@...il.com>
> Sent: Tuesday, June 12, 2018 8:43 AM
> Cc: Zhouyang Jia <jiazhouyang09@...il.com>; Dept-Eng QLogic Storage
> Upstream <QLogic-Storage-Upstream@...ium.com>; James E.J. Bottomley
> <jejb@...ux.vnet.ibm.com>; Martin K. Petersen <martin.petersen@...cle.com>;
> linux-scsi@...r.kernel.org; linux-kernel@...r.kernel.org
> Subject: [PATCH] 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@...il.com>
> ---
> drivers/scsi/bnx2i/bnx2i_hwi.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/scsi/bnx2i/bnx2i_hwi.c b/drivers/scsi/bnx2i/bnx2i_hwi.c index
> 8f03a86..e9e669a 100644
> --- a/drivers/scsi/bnx2i/bnx2i_hwi.c
> +++ b/drivers/scsi/bnx2i/bnx2i_hwi.c
> @@ -2727,6 +2727,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;
> }
>
> --
> 2.7.4
Thanks,
Acked-by: Manish Rangankar <Manish.Rangankar@...ium.com>
Powered by blists - more mailing lists