staging: android: Remove unneeded else following a return
authorJanani Ravichandran <janani.rvchndrn@gmail.com>
Thu, 18 Feb 2016 22:39:11 +0000 (17:39 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Feb 2016 23:24:51 +0000 (15:24 -0800)
Remove unnecessary else when there is a return statement in the
corresponding if block.
Coccinelle patch used:

@rule1@
expression e1;
@@

if (e1) { ... return ...; }
-       else{
        ...
-            }

@rule2@
expression e2;
statement s1;
@@

if(e2) { ... return ...; }
-       else
s1

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/sync.c

index 2ab0c208088de6bd2cd973c5fd1d798f8884fa2b..3a8f210314400eb19e55e61f5b7390c8ea331902 100644 (file)
@@ -424,7 +424,7 @@ static unsigned int sync_file_poll(struct file *file, poll_table *wait)
 
        if (!status)
                return POLLIN;
-       else if (status < 0)
+       if (status < 0)
                return POLLERR;
        return 0;
 }
This page took 0.046571 seconds and 5 git commands to generate.