Commit 20078e48 authored by Ken Depro's avatar Ken Depro Committed by Greg Kroah-Hartman

staging: unisys: Fix "else not useful after return" warning in virthba.c

This patch fixes a warning generated during the checkpatch script that stated
"else not useful after return".  I modified the code to return a designated
status at the end of the function, and replaced the return statement in the
"else if" to set the status accordingly.
Signed-off-by: default avatarKen Depro <kenneth.depro@unisys.com>
Signed-off-by: default avatarBenjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1cc598c7
...@@ -1584,6 +1584,8 @@ virthba_serverdown_complete(struct work_struct *work) ...@@ -1584,6 +1584,8 @@ virthba_serverdown_complete(struct work_struct *work)
static int static int
virthba_serverdown(struct virtpci_dev *virtpcidev, u32 state) virthba_serverdown(struct virtpci_dev *virtpcidev, u32 state)
{ {
int stat = 1;
struct virthba_info *virthbainfo = struct virthba_info *virthbainfo =
(struct virthba_info *)((struct Scsi_Host *)virtpcidev->scsi. (struct virthba_info *)((struct Scsi_Host *)virtpcidev->scsi.
scsihost)->hostdata; scsihost)->hostdata;
...@@ -1598,11 +1600,12 @@ virthba_serverdown(struct virtpci_dev *virtpcidev, u32 state) ...@@ -1598,11 +1600,12 @@ virthba_serverdown(struct virtpci_dev *virtpcidev, u32 state)
&virthbainfo->serverdown_completion); &virthbainfo->serverdown_completion);
} else if (virthbainfo->serverchangingstate) { } else if (virthbainfo->serverchangingstate) {
LOGERR("Server already processing change state message\n"); LOGERR("Server already processing change state message\n");
return 0; stat = 0;
} else } else {
LOGERR("Server already down, but another server down message received."); LOGERR("Server already down, but another server down message received.");
}
return 1; return stat;
} }
/*****************************************************/ /*****************************************************/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment