IB/usnic: check for allocation failure
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 25 Aug 2017 08:43:59 +0000 (11:43 +0300)
committerDoug Ledford <dledford@redhat.com>
Mon, 28 Aug 2017 23:12:24 +0000 (19:12 -0400)
commitd518a44d317d92f4c297ea26a308b1ac1a980d33
tree88cea46d5a535430a33dd2f614c2d1b826659216
parent280ad49a97ee7adf5c86f70f7ea1ff60a755b294
IB/usnic: check for allocation failure

usnic_uiom_get_dev_list() can return ERR_PTR(-ENOMEM) so we should check
for that.

Fixes: e3cf00d0a87f ("IB/usnic: Add Cisco VIC low-level hardware driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/usnic/usnic_ib_verbs.c