]> git.baikalelectronics.ru Git - kernel.git/commit
cxgb4: Fix error codes in c4iw_create_cq()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 13 Jul 2017 07:47:40 +0000 (10:47 +0300)
committerDoug Ledford <dledford@redhat.com>
Thu, 20 Jul 2017 15:20:49 +0000 (11:20 -0400)
commit10a7ac03b43c6ddc8116634e9ae3a8819ac4d8dc
treeda8292c509436a3867c9a711869afc32957ad28a
parent6ce2fbced84932d670ad86b21072f42c5d1566f9
cxgb4: Fix error codes in c4iw_create_cq()

If one of these kmalloc() calls fails then we return ERR_PTR(0) which is
NULL.  It results in a NULL dereference in the callers.

Fixes: c7b6c53cab84 ("RDMA/cxgb4: Add driver for Chelsio T4 RNIC")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/cxgb4/cq.c