Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3c10c7c929b30e8813d15960cb97f95a0b2ba615
Commit:     3c10c7c929b30e8813d15960cb97f95a0b2ba615
Parent:     339e2640a9f403f7b7acb2ea67f3568b8ac3eebf
Author:     Ali Ayoub <[EMAIL PROTECTED]>
AuthorDate: Sun Sep 9 14:55:11 2007 +0300
Committer:  Roland Dreier <[EMAIL PROTECTED]>
CommitDate: Tue Oct 9 19:59:07 2007 -0700

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Roland Dreier <[EMAIL PROTECTED]>
---
 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 d271bd7..312c8ff 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)
                                            query->sm_ah->pkey_index,
                                            0, IB_MGMT_SA_HDR, IB_MGMT_SA_DATA,
                                            gfp_mask);
-       if (!query->mad_buf) {
+       if (IS_ERR(query->mad_buf)) {
                kref_put(&query->sm_ah->ref, free_sm_ah);
                return -ENOMEM;
        }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to