diff options
author | Ali Ayoub <ali@mellanox.co.il> | 2007-09-09 07:55:11 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-10-09 22:59:07 -0400 |
commit | 3c10c7c929b30e8813d15960cb97f95a0b2ba615 (patch) | |
tree | afa80536856b47a173c0e850c6acb02baf4e75e7 /drivers/infiniband | |
parent | 339e2640a9f403f7b7acb2ea67f3568b8ac3eebf (diff) |
IB/sa: Error handling thinko fix
ib_create_send_mad() returns an error code pointer on error, not NULL.
Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/core/sa_query.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/sa_query.c b/drivers/infiniband/core/sa_query.c index d271bd715c12..312c8ff5ae88 100644 --- a/drivers/infiniband/core/sa_query.c +++ b/drivers/infiniband/core/sa_query.c | |||
@@ -531,7 +531,7 @@ static int alloc_mad(struct ib_sa_query *query, gfp_t gfp_mask) | |||
531 | query->sm_ah->pkey_index, | 531 | query->sm_ah->pkey_index, |
532 | 0, IB_MGMT_SA_HDR, IB_MGMT_SA_DATA, | 532 | 0, IB_MGMT_SA_HDR, IB_MGMT_SA_DATA, |
533 | gfp_mask); | 533 | gfp_mask); |
534 | if (!query->mad_buf) { | 534 | if (IS_ERR(query->mad_buf)) { |
535 | kref_put(&query->sm_ah->ref, free_sm_ah); | 535 | kref_put(&query->sm_ah->ref, free_sm_ah); |
536 | return -ENOMEM; | 536 | return -ENOMEM; |
537 | } | 537 | } |