diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2016-07-23 08:30:52 +0200 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-08-03 21:03:35 -0400 |
commit | f7ca535ba0b2268609d50bcd4bc3e8267dfd01b3 (patch) | |
tree | 0846fd4c9261b5970feec7e3df8c2e23a056c87e /drivers | |
parent | 3f85f2aaabf785e53bbcd242cb92aeda28990ef5 (diff) | |
download | linux-f7ca535ba0b2268609d50bcd4bc3e8267dfd01b3.tar.bz2 |
IB/hfi1: NULL arg to sc_return_credits is OK
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 <elfring@users.sourceforge.net>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/hw/hfi1/file_ops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/hfi1/file_ops.c b/drivers/infiniband/hw/hfi1/file_ops.c index 7a5b0e676cc7..3b792c5023d0 100644 --- 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; |