linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] scsi: csiostor: fix improper reference to variable
@ 2016-12-03 13:36 Pan Bian
  0 siblings, 0 replies; only message in thread
From: Pan Bian @ 2016-12-03 13:36 UTC (permalink / raw)
  To: James E.J. Bottomley, Martin K. Petersen, linux-scsi
  Cc: linux-kernel, Pan Bian

From: Pan Bian <bianpan2016@163.com>

In function csio_config_device_caps(), returns the value of variable rv
on error paths. However, when validating device capabilities, its value
is reset, and will be 0 on the following error paths. 0 means no error
in this context. It may be better to use variable retval to receive
the return value of function csio_hw_validate_caps().

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188861

Signed-off-by: Pan Bian <bianpan2016@163.com>
---
 drivers/scsi/csiostor/csio_hw.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/csiostor/csio_hw.c b/drivers/scsi/csiostor/csio_hw.c
index 622bdab..c7d95ba 100644
--- a/drivers/scsi/csiostor/csio_hw.c
+++ b/drivers/scsi/csiostor/csio_hw.c
@@ -1372,8 +1372,8 @@ struct t4_vpd_hdr {
 	}
 
 	/* Validate device capabilities */
-	rv = csio_hw_validate_caps(hw, mbp);
-	if (rv != 0)
+	retval = csio_hw_validate_caps(hw, mbp);
+	if (retval != 0)
 		goto out;
 
 	/* Don't config device capabilities if already configured */
-- 
1.9.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-12-03 13:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-03 13:36 [PATCH 1/1] scsi: csiostor: fix improper reference to variable Pan Bian

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).