Skip to content

Commit 67f1aee

Browse files
Hariprasad Sdledford
Hariprasad S
authored andcommitted
iw_cxgb3: Fix incorrectly returning error on success
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: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
1 parent c5dfb00 commit 67f1aee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: drivers/infiniband/hw/cxgb3/iwch_cm.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ static int iwch_l2t_send(struct t3cdev *tdev, struct sk_buff *skb, struct l2t_en
149149
error = l2t_send(tdev, skb, l2e);
150150
if (error < 0)
151151
kfree_skb(skb);
152-
return error;
152+
return error < 0 ? error : 0;
153153
}
154154

155155
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)
165165
error = cxgb3_ofld_send(tdev, skb);
166166
if (error < 0)
167167
kfree_skb(skb);
168-
return error;
168+
return error < 0 ? error : 0;
169169
}
170170

171171
static void release_tid(struct t3cdev *tdev, u32 hwtid, struct sk_buff *skb)

0 commit comments

Comments
 (0)