]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
IPoIB: Correct debugging output when path record lookup fails
authorRoland Dreier <rolandd@cisco.com>
Mon, 26 Feb 2007 20:57:08 +0000 (12:57 -0800)
committerRoland Dreier <rolandd@cisco.com>
Mon, 26 Feb 2007 20:57:08 +0000 (12:57 -0800)
If path_rec_completion() is passed a non-NULL path record pointer
along with an unsuccessful status value, the tracing code incorrectly
prints the (invalid) DLID from the path record rather than the more
interesting status code.  The actual logic of the function correctly
uses the path record only if the status indicates a successful lookup.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/ulp/ipoib/ipoib_main.c

index 18d27fd352ad9667972b71a6a2242a12ded97d39..f9dbc6f68145647078a74be3b49da198fe598781 100644 (file)
@@ -385,7 +385,7 @@ static void path_rec_completion(int status,
        struct sk_buff *skb;
        unsigned long flags;
 
-       if (pathrec)
+       if (!status)
                ipoib_dbg(priv, "PathRec LID 0x%04x for GID " IPOIB_GID_FMT "\n",
                          be16_to_cpu(pathrec->dlid), IPOIB_GID_ARG(pathrec->dgid));
        else