IB/i40iw: Fix error code in i40iw_create_cq()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 13 Jul 2017 07:47:22 +0000 (10:47 +0300)
committerDoug Ledford <dledford@redhat.com>
Thu, 20 Jul 2017 15:20:49 +0000 (11:20 -0400)
commit6031e079aa4656743298ea235b894ee883f45c71
tree23599baf40234cbd2fdbbd4818315cd499e42ed8
parent5c8857b653e71a9850a02837e1268e3198abbd1a
IB/i40iw: Fix error code in i40iw_create_cq()

We accidentally forgot to set the error code if ib_copy_from_udata()
fails.  It means we return ERR_PTR(0) which is NULL and results in a
NULL dereference in the callers.

Fixes: d37498417947 ("i40iw: add files for iwarp interface")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/i40iw/i40iw_verbs.c