projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3f85f2a
)
IB/hfi1: NULL arg to sc_return_credits is OK
author
Markus Elfring
<
[email protected]
>
Sat, 23 Jul 2016 06:30:52 +0000
(08:30 +0200)
committer
Doug Ledford
<
[email protected]
>
Thu, 4 Aug 2016 01:03:35 +0000
(21:03 -0400)
The sc_return_credits() function tests whether its argument is NULL
and then returns immediately. Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <
[email protected]
>
Signed-off-by: Doug Ledford <
[email protected]
>
drivers/infiniband/hw/hfi1/file_ops.c
patch
|
blob
|
history
diff --git
a/drivers/infiniband/hw/hfi1/file_ops.c
b/drivers/infiniband/hw/hfi1/file_ops.c
index 7a5b0e676cc7a4b1c1d9a65c76d66ba2f23a1f32..3b792c5023d0a96a6503352f8908cf71e2fd6a11 100644
(file)
--- a/
drivers/infiniband/hw/hfi1/file_ops.c
+++ b/
drivers/infiniband/hw/hfi1/file_ops.c
@@
-225,7
+225,7
@@
static long hfi1_file_ioctl(struct file *fp, unsigned int cmd,
sizeof(struct hfi1_base_info));
break;
case HFI1_IOCTL_CREDIT_UPD:
- if (uctxt
&& uctxt->sc
)
+ if (uctxt)
sc_return_credits(uctxt->sc);
break;