diff options
author | Tom Tucker <tom@opengridcomputing.com> | 2008-04-16 21:09:34 -0700 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-04-16 21:09:34 -0700 |
commit | 9285faa1e7c8ffcc8901c40f6e1cc06d93e92431 (patch) | |
tree | 094647e312edba67f6f5b555020ecb6fd7f34f67 /drivers/infiniband/hw/amso1100/c2_intr.c | |
parent | bbf8eed1a0f8949f7385146624f736f829992a70 (diff) | |
download | kernel-crypto-9285faa1e7c8ffcc8901c40f6e1cc06d93e92431.tar.gz kernel-crypto-9285faa1e7c8ffcc8901c40f6e1cc06d93e92431.tar.xz kernel-crypto-9285faa1e7c8ffcc8901c40f6e1cc06d93e92431.zip |
RDMA/amso1100: Add check for NULL reply_msg in c2_intr()
Fix a place where we might dereference a NULL pointer; this fixes
Coverity CID 1392. On inspection I also found a place where we could
attempt to kmem_cache_free() a NULL pointer, so fix this too.
Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/amso1100/c2_intr.c')
-rw-r--r-- | drivers/infiniband/hw/amso1100/c2_intr.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/amso1100/c2_intr.c b/drivers/infiniband/hw/amso1100/c2_intr.c index 0d0bc33ca30..3b5095470cb 100644 --- a/drivers/infiniband/hw/amso1100/c2_intr.c +++ b/drivers/infiniband/hw/amso1100/c2_intr.c @@ -174,7 +174,11 @@ static void handle_vq(struct c2_dev *c2dev, u32 mq_index) return; } - err = c2_errno(reply_msg); + if (reply_msg) + err = c2_errno(reply_msg); + else + err = -ENOMEM; + if (!err) switch (req->event) { case IW_CM_EVENT_ESTABLISHED: c2_set_qp_state(req->qp, |