kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: qedi: add missing curly braces
@ 2021-08-12  6:33 Dan Carpenter
  2021-08-16 17:19 ` Martin K. Petersen
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2021-08-12  6:33 UTC (permalink / raw)
  To: Nilesh Javali, Shai Malin
  Cc: Manish Rangankar, GR-QLogic-Storage-Upstream,
	James E.J. Bottomley, Martin K. Petersen, linux-scsi,
	kernel-janitors

This if statement has missing curly braces so it will always report an
error even when the call to ->offload_conn() succeeded.

Fixes: 072ae05a044f ("scsi: qedi: Add support for fastpath doorbell recovery")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/scsi/qedi/qedi_iscsi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/qedi/qedi_iscsi.c b/drivers/scsi/qedi/qedi_iscsi.c
index 8ac8aabc1ef6..c5260429c637 100644
--- a/drivers/scsi/qedi/qedi_iscsi.c
+++ b/drivers/scsi/qedi/qedi_iscsi.c
@@ -599,7 +599,7 @@ static int qedi_iscsi_offload_conn(struct qedi_endpoint *qedi_ep)
 	}
 
 	rval = qedi_ops->offload_conn(qedi->cdev, qedi_ep->handle, conn_info);
-	if (rval)
+	if (rval) {
 		/* delete doorbell from doorbell recovery mechanism */
 		rval = qedi_ops->common->db_recovery_del(qedi->cdev,
 							 qedi_ep->p_doorbell,
@@ -607,6 +607,7 @@ static int qedi_iscsi_offload_conn(struct qedi_endpoint *qedi_ep)
 
 		QEDI_ERR(&qedi->dbg_ctx, "offload_conn returned %d, ep=%p\n",
 			 rval, qedi_ep);
+	}
 
 	kfree(conn_info);
 	return rval;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] scsi: qedi: add missing curly braces
  2021-08-12  6:33 [PATCH] scsi: qedi: add missing curly braces Dan Carpenter
@ 2021-08-16 17:19 ` Martin K. Petersen
  0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2021-08-16 17:19 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Nilesh Javali, Shai Malin, Manish Rangankar,
	GR-QLogic-Storage-Upstream, James E.J. Bottomley,
	Martin K. Petersen, linux-scsi, kernel-janitors


Hi Dan!

> This if statement has missing curly braces so it will always report an
> error even when the call to ->offload_conn() succeeded.

Already fixed this up in 9757f8af0442.

Thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-16 17:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-12  6:33 [PATCH] scsi: qedi: add missing curly braces Dan Carpenter
2021-08-16 17:19 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).