mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-05 13:29:17 -04:00
staging: ozwpan: Fix error checking while transmitting frame.
Make sure that we return negative value if oz_build_frame() returns NULL. Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
4882ad9561
commit
37bc8f7856
@@ -618,14 +618,14 @@ static int oz_send_next_queued_frame(struct oz_pd *pd, int more_data)
|
||||
pd->last_sent_frame = e;
|
||||
skb = oz_build_frame(pd, f);
|
||||
spin_unlock(&pd->tx_frame_lock);
|
||||
if (!skb)
|
||||
return -1;
|
||||
if (more_data)
|
||||
oz_set_more_bit(skb);
|
||||
oz_dbg(TX_FRAMES, "TX frame PN=0x%x\n", f->hdr.pkt_num);
|
||||
if (skb) {
|
||||
if (dev_queue_xmit(skb) < 0)
|
||||
return -1;
|
||||
if (dev_queue_xmit(skb) < 0)
|
||||
return -1;
|
||||
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user