Skip to content
Commit fc3aa45b authored by Dan Carpenter's avatar Dan Carpenter Committed by Doug Ledford
Browse files

IB/usnic: clean up some error handling code



This code causes a static checker warning:

	drivers/infiniband/hw/usnic/usnic_uiom.c:476 usnic_uiom_alloc_pd()
	warn: passing zero to 'PTR_ERR'

This code isn't buggy, but iommu_domain_alloc() doesn't return an error
pointer so we can simplify the error handling and silence the static
checker warning.

The static checker warning is to catch place which do:

	if (!ptr)
		return ERR_PTR(ptr);

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarDave Goodell <dgoodell@cisco.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent ed0de4a8
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