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: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Ken Depro 2015-01-20 10:01:13 -05:00 committed by Greg Kroah-Hartman
parent 1cc598c75b
commit 20078e4859
1 changed files with 6 additions and 3 deletions

View File

@ -1584,6 +1584,8 @@ virthba_serverdown_complete(struct work_struct *work)
static int
virthba_serverdown(struct virtpci_dev *virtpcidev, u32 state)
{
int stat = 1;
struct virthba_info *virthbainfo =
(struct virthba_info *)((struct Scsi_Host *)virtpcidev->scsi.
scsihost)->hostdata;
@ -1598,11 +1600,12 @@ virthba_serverdown(struct virtpci_dev *virtpcidev, u32 state)
&virthbainfo->serverdown_completion);
} else if (virthbainfo->serverchangingstate) {
LOGERR("Server already processing change state message\n");
return 0;
} else
stat = 0;
} else {
LOGERR("Server already down, but another server down message received.");
}
return 1;
return stat;
}
/*****************************************************/