diff mbox series

scsi: message: fusion: remove redundant assignment to variable ret

Message ID 20190704133624.31081-1-colin.king@canonical.com (mailing list archive)
State Deferred
Headers show
Series scsi: message: fusion: remove redundant assignment to variable ret | expand

Commit Message

Colin King July 4, 2019, 1:36 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

The variable ret is being initialized with a value that is never
read and it is being updated later with a new value. The
initialization is redundant and can be removed.  Also move { brace
to the conventional coding style location.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/message/fusion/mptbase.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index c2dd322691d1..449916e062ce 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -7106,8 +7106,9 @@  mpt_SoftResetHandler(MPT_ADAPTER *ioc, int sleepFlag)
  *	HardReset.
  **/
 int
-mpt_Soft_Hard_ResetHandler(MPT_ADAPTER *ioc, int sleepFlag) {
-	int ret = -1;
+mpt_Soft_Hard_ResetHandler(MPT_ADAPTER *ioc, int sleepFlag)
+{
+	int ret;
 
 	ret = mpt_SoftResetHandler(ioc, sleepFlag);
 	if (ret == 0)