Commit f7ca535b authored by Markus Elfring's avatar Markus Elfring Committed by Doug Ledford

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: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 3f85f2aa
...@@ -225,7 +225,7 @@ static long hfi1_file_ioctl(struct file *fp, unsigned int cmd, ...@@ -225,7 +225,7 @@ static long hfi1_file_ioctl(struct file *fp, unsigned int cmd,
sizeof(struct hfi1_base_info)); sizeof(struct hfi1_base_info));
break; break;
case HFI1_IOCTL_CREDIT_UPD: case HFI1_IOCTL_CREDIT_UPD:
if (uctxt && uctxt->sc) if (uctxt)
sc_return_credits(uctxt->sc); sc_return_credits(uctxt->sc);
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment