linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] infiniband: hw: qib: Unneeded variable ret
@ 2019-07-16 17:29 Hariprasad Kelam
  2019-07-25 16:58 ` Jason Gunthorpe
  0 siblings, 1 reply; 2+ messages in thread
From: Hariprasad Kelam @ 2019-07-16 17:29 UTC (permalink / raw)
  To: Dennis Dalessandro, Mike Marciniszyn, Doug Ledford,
	Jason Gunthorpe, linux-rdma, linux-kernel

fix below issue reported by coccicheck
drivers/infiniband/hw/qib/qib_file_ops.c:1792:5-8: Unneeded variable:
"ret". Return "0" on line 1876

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
---
 drivers/infiniband/hw/qib/qib_file_ops.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/qib/qib_file_ops.c b/drivers/infiniband/hw/qib/qib_file_ops.c
index 27b6e66..b014422 100644
--- a/drivers/infiniband/hw/qib/qib_file_ops.c
+++ b/drivers/infiniband/hw/qib/qib_file_ops.c
@@ -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)
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] infiniband: hw: qib: Unneeded variable ret
  2019-07-16 17:29 [PATCH] infiniband: hw: qib: Unneeded variable ret Hariprasad Kelam
@ 2019-07-25 16:58 ` Jason Gunthorpe
  0 siblings, 0 replies; 2+ messages in thread
From: Jason Gunthorpe @ 2019-07-25 16:58 UTC (permalink / raw)
  To: Hariprasad Kelam
  Cc: Dennis Dalessandro, Mike Marciniszyn, Doug Ledford, linux-rdma,
	linux-kernel

On Tue, Jul 16, 2019 at 10:59:25PM +0530, Hariprasad Kelam wrote:
> fix below issue reported by coccicheck
> drivers/infiniband/hw/qib/qib_file_ops.c:1792:5-8: Unneeded variable:
> "ret". Return "0" on line 1876
> 
> Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
> ---
>  drivers/infiniband/hw/qib/qib_file_ops.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Applied to for-next, thanks

Jason

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-25 16:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-16 17:29 [PATCH] infiniband: hw: qib: Unneeded variable ret Hariprasad Kelam
2019-07-25 16:58 ` Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).