Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;