Commit dd25a5d9 authored by Hariprasad S's avatar Hariprasad S Committed by Sasha Levin

iw_cxgb3: Fix incorrectly returning error on success

[ Upstream commit 67f1aee6 ]

The cxgb3_*_send() functions return NET_XMIT_ values, which are
positive integers values. So don't treat positive return values
as an error.
Signed-off-by: default avatarSteve Wise <swise@opengridcomputing.com>
Signed-off-by: default avatarHariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
parent 2f53ace4
...@@ -149,7 +149,7 @@ static int iwch_l2t_send(struct t3cdev *tdev, struct sk_buff *skb, struct l2t_en ...@@ -149,7 +149,7 @@ static int iwch_l2t_send(struct t3cdev *tdev, struct sk_buff *skb, struct l2t_en
error = l2t_send(tdev, skb, l2e); error = l2t_send(tdev, skb, l2e);
if (error < 0) if (error < 0)
kfree_skb(skb); kfree_skb(skb);
return error; return error < 0 ? error : 0;
} }
int iwch_cxgb3_ofld_send(struct t3cdev *tdev, struct sk_buff *skb) int iwch_cxgb3_ofld_send(struct t3cdev *tdev, struct sk_buff *skb)
...@@ -165,7 +165,7 @@ int iwch_cxgb3_ofld_send(struct t3cdev *tdev, struct sk_buff *skb) ...@@ -165,7 +165,7 @@ int iwch_cxgb3_ofld_send(struct t3cdev *tdev, struct sk_buff *skb)
error = cxgb3_ofld_send(tdev, skb); error = cxgb3_ofld_send(tdev, skb);
if (error < 0) if (error < 0)
kfree_skb(skb); kfree_skb(skb);
return error; return error < 0 ? error : 0;
} }
static void release_tid(struct t3cdev *tdev, u32 hwtid, struct sk_buff *skb) static void release_tid(struct t3cdev *tdev, u32 hwtid, struct sk_buff *skb)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment