Staging: vme: devices: Merges two lines of code and removes unused variable
authorMahati Chamarthy <mahati.chamarthy@gmail.com>
Mon, 22 Sep 2014 17:34:13 +0000 (23:04 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Sep 2014 03:25:29 +0000 (20:25 -0700)
This patch merges an assignment with an immediately following return of
the assigned variable.  The following Coccinelle semantic patch was used
to make this transformation:

@@
expression ret;
identifier f;
@@

-ret =
+return
     f(...);
-return ret;

Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vme/devices/vme_user.c

index 920e50addd3e9d1e7f270b22cf4cf758f5c71a23..73cec14cbf566c89436f4b92b8c6ed435513881b 100644 (file)
@@ -482,11 +482,9 @@ static int vme_user_ioctl(struct inode *inode, struct file *file,
                                return -EFAULT;
                        }
 
-                       retval = vme_irq_generate(vme_user_bridge,
+                       return vme_irq_generate(vme_user_bridge,
                                                  irq_req.level,
                                                  irq_req.statid);
-
-                       return retval;
                }
                break;
        case MASTER_MINOR: