]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
staging: unisys: visornic: Remove unnecessary else after return
authorBhaktipriya Shridhar <bhaktipriya96@gmail.com>
Thu, 10 Mar 2016 17:39:14 +0000 (23:09 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Mar 2016 03:29:45 +0000 (19:29 -0800)
This patch fixes the checkpatch warning that else is not generally
useful after a break or return.

This was done using Coccinelle:
@@
expression e2;
statement s1;
@@
if(e2) { ... return ...; }
-else
         s

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/visornic/visornic_main.c

index 6749c4e1c9019fe8b34d915bac695d58f1747083..be0d057346c38c9b663c08f23b6e935b8569fb10 100644 (file)
@@ -760,9 +760,8 @@ static unsigned long devdata_xmits_outstanding(struct visornic_devdata *devdata)
        if (devdata->chstat.sent_xmit >= devdata->chstat.got_xmit_done)
                return devdata->chstat.sent_xmit -
                        devdata->chstat.got_xmit_done;
-       else
-               return (ULONG_MAX - devdata->chstat.got_xmit_done
-                       + devdata->chstat.sent_xmit + 1);
+       return (ULONG_MAX - devdata->chstat.got_xmit_done
+               + devdata->chstat.sent_xmit + 1);
 }
 
 /**