[openib-general] [2.6 patch] drivers/infiniband/hw/amso1100/c2_rnic.c: fix a NULL dereference

Adrian Bunk bunk at stusta.de
Sun Oct 8 16:16:35 PDT 2006


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

Signed-off-by: Adrian Bunk <bunk at stusta.de>

--- linux-2.6/drivers/infiniband/hw/amso1100/c2_rnic.c.old	2006-10-09 00:39:32.000000000 +0200
+++ linux-2.6/drivers/infiniband/hw/amso1100/c2_rnic.c	2006-10-09 00:40:30.000000000 +0200
@@ -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;
 





More information about the general mailing list