Skip to contentSkip to conversation

drivers/infiniband/hw/amso1100/c2_rnic.c: fix a NULL dereference

PATCH New Adrian Bunk 1 participant 1 message Oct 8, 2006 InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/infiniband/hw/amso1100/c2_rnic.c: fix a NULL dereference

This patch fixes a NULL dereference spotted by the Coverity checker.

drivers/infiniband/hw/amso1100/c2_rnic.c renamed from drivers/infiniband/hw/amso1100/c2_rnic.c.old +2 -2
@@ -150,8 +150,8 @@
 	    (struct c2wr_rnic_query_rep *) (unsigned long) (vq_req->reply_msg);
 	if (!reply)
 		err = -ENOMEM;
-
-	err = c2_errno(reply);
+	else
+		err = c2_errno(reply);
 	if (err)
 		goto bail2;