lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 25 Jun 2015 15:22:16 +0530
From:	Maninder Singh <maninder1.s@...sung.com>
To:	nmusini@...co.com, sebaddel@...co.com, JBottomley@...n.com,
	linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:	pankaj.m@...sung.com, Maninder Singh <maninder1.s@...sung.com>
Subject: [PATCH 1/1] scsi/snic: fixing the error print

Currently SNIC_HOST_ERR is called in both cases
whether snic_disc_start returns zero or non-zero.

>From the code it looks like it has to print only if
snic_disc_start return non-zero value, So calling
SNIC_HOST_ERR only for non-zero return from snic_disc_start.

Signed-off-by: Maninder Singh <maninder1.s@...sung.com>
Reviewed-by: Rohit Thapliyal <r.thapliyal@...sung.com>
---
 drivers/scsi/snic/snic_disc.c |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/scsi/snic/snic_disc.c b/drivers/scsi/snic/snic_disc.c
index 5f63217..8c29d5e 100644
--- a/drivers/scsi/snic/snic_disc.c
+++ b/drivers/scsi/snic/snic_disc.c
@@ -514,12 +514,9 @@ snic_handle_disc(struct work_struct *work)
 
 	ret = snic_disc_start(snic);
 	if (ret)
-		goto disc_err;
-
-disc_err:
-	SNIC_HOST_ERR(snic->shost,
-		      "disc_work: Discovery Failed w/ err = %d\n",
-		      ret);
+		SNIC_HOST_ERR(snic->shost,
+			      "disc_work: Discovery Failed w/ err = %d\n",
+			      ret);
 } /* end of snic_disc_work */
 
 /*
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ