lkml.org 
[lkml]   [2016]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/1] scsi: csiostor: fix improper reference to variable
Date
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

\
 
 \ /
  Last update: 2016-12-03 14:37    [W:0.645 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site