mirror of
https://github.com/torvalds/linux.git
synced 2024-11-02 18:21:49 +00:00
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>
This commit is contained in:
parent
3f85f2aaab
commit
f7ca535ba0
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user