RDMA/amso1100: Fix a NULL dereference in error path
authorAdrian Bunk <bunk@stusta.de>
Tue, 10 Oct 2006 21:26:02 +0000 (14:26 -0700)
committerRoland Dreier <rolandd@cisco.com>
Mon, 16 Oct 2006 17:06:07 +0000 (10:06 -0700)
This patch fixes a NULL dereference spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Acked-by: Steve Wise <swise@opengridcomputing.com>
Acked-by: Tom Tucker <tom@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/amso1100/c2_rnic.c

index e37c568..30409e1 100644 (file)
@@ -150,8 +150,8 @@ static int c2_rnic_query(struct c2_dev *c2dev, struct ib_device_attr *props)
            (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;