RDMA/qib: Unneeded variable ret
authorHariprasad Kelam <hariprasad.kelam@gmail.com>
Tue, 16 Jul 2019 17:29:25 +0000 (22:59 +0530)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 25 Jul 2019 16:53:45 +0000 (13:53 -0300)
Fix the below warning reported by coccicheck:

drivers/infiniband/hw/qib/qib_file_ops.c:1792:5-8: Unneeded variable:
"ret". Return "0" on line 1876

Link: https://lore.kernel.org/r/20190716172924.GA12241@hari-Inspiron-1545
Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/qib/qib_file_ops.c

index 27b6e66..b014422 100644 (file)
@@ -1789,7 +1789,6 @@ static void unlock_expected_tids(struct qib_ctxtdata *rcd)
 
 static int qib_close(struct inode *in, struct file *fp)
 {
-       int ret = 0;
        struct qib_filedata *fd;
        struct qib_ctxtdata *rcd;
        struct qib_devdata *dd;
@@ -1873,7 +1872,7 @@ static int qib_close(struct inode *in, struct file *fp)
 
 bail:
        kfree(fd);
-       return ret;
+       return 0;
 }
 
 static int qib_ctxt_info(struct file *fp, struct qib_ctxt_info __user *uinfo)