From: Ken Depro <kenneth.depro@xxxxxxxxxx> 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@xxxxxxxxxx> Signed-off-by: Benjamin Romer <benjamin.romer@xxxxxxxxxx> --- drivers/staging/unisys/virthba/virthba.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c index b78156d..612239e 100644 --- a/drivers/staging/unisys/virthba/virthba.c +++ b/drivers/staging/unisys/virthba/virthba.c @@ -1573,6 +1573,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; @@ -1587,12 +1589,12 @@ virthba_serverdown(struct virtpci_dev *virtpcidev, u32 state) &virthbainfo->serverdown_completion); } else if (virthbainfo->serverchangingstate) { pr_err("Server already processing change state message\n"); - return 0; + stat = 0; } else { pr_err("Server already down, but another server down message received."); } - return 1; + return stat; } /*****************************************************/ -- 2.1.0 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel