From ce56b921aade5f233c3814c5ff28461133117078 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Thu, 13 Jul 2017 10:47:40 +0300 Subject: [PATCH] cxgb4: Fix error codes in c4iw_create_cq() commit 6ebedacbb44602d4dec3348dee5ec31dd9b09521 upstream. 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: cfdda9d76436 ("RDMA/cxgb4: Add driver for Chelsio T4 RNIC") Signed-off-by: Dan Carpenter Acked-by: Steve Wise Signed-off-by: Doug Ledford Signed-off-by: Ben Hutchings --- Reading git-format-patch failed