Skip to content

Commit

Permalink
rt2x00: Use unlikely for error case in rt2x00queue_write_tx_frame
Browse files Browse the repository at this point in the history
This is an error condition that is not supposed to happen. Hence, it is
safe to add unlikely to this check.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Helmut Schaa authored and John W. Linville committed Oct 11, 2010
1 parent ff6133b commit c6084d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/wireless/rt2x00/rt2x00queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,8 @@ int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb,
if (unlikely(rt2x00queue_full(queue)))
return -ENOBUFS;

if (test_and_set_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags)) {
if (unlikely(test_and_set_bit(ENTRY_OWNER_DEVICE_DATA,
&entry->flags))) {
ERROR(queue->rt2x00dev,
"Arrived at non-free entry in the non-full queue %d.\n"
"Please file bug report to %s.\n",
Expand Down

0 comments on commit c6084d5

Please sign in to comment.