diff options
author | Dan Carpenter <error27@gmail.com> | 2011-01-10 17:42:10 -0800 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2011-01-10 17:42:10 -0800 |
commit | d0444f1527f22d193c209d4fdad0dbabbf2be2ee (patch) | |
tree | d2f17364cd4455470ab5b8ef62151d48aa77507f /drivers | |
parent | 3c0eee3fe6a3a1c745379547c7e7c904aa64f6d5 (diff) | |
download | linux-3.10-d0444f1527f22d193c209d4fdad0dbabbf2be2ee.tar.gz linux-3.10-d0444f1527f22d193c209d4fdad0dbabbf2be2ee.tar.bz2 linux-3.10-d0444f1527f22d193c209d4fdad0dbabbf2be2ee.zip |
IB/mthca: Handle -ENOMEM in forward_trap()
ib_create_send_mad() can return ERR_PTR(-ENOMEM) here.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_mad.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_mad.c b/drivers/infiniband/hw/mthca/mthca_mad.c index 5648659ff0b..03a59534f59 100644 --- a/drivers/infiniband/hw/mthca/mthca_mad.c +++ b/drivers/infiniband/hw/mthca/mthca_mad.c @@ -171,6 +171,8 @@ static void forward_trap(struct mthca_dev *dev, if (agent) { send_buf = ib_create_send_mad(agent, qpn, 0, 0, IB_MGMT_MAD_HDR, IB_MGMT_MAD_DATA, GFP_ATOMIC); + if (IS_ERR(send_buf)) + return; /* * We rely here on the fact that MLX QPs don't use the * address handle after the send is posted (this is |