Skip to content

Commit

Permalink
can: rx-offload: can_rx_offload_offload_one(): avoid double unlikely(…
Browse files Browse the repository at this point in the history
…) notation when using IS_ERR()

The definition of IS_ERR() already applies the unlikely() notation when
checking the error status of the passed pointer. For this reason there is no
need to have the same notation outside of IS_ERR() itself.

Clean up code by removing redundant notation.

Signed-off-by: Antonio Quartulli <a@unstable.cc>
Link: https://lore.kernel.org/r/20201210085321.18693-1-a@unstable.cc
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
  • Loading branch information
Antonio Quartulli authored and Marc Kleine-Budde committed Dec 10, 2020
1 parent 921ca57 commit ecbaf5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/can/rx-offload.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ can_rx_offload_offload_one(struct can_rx_offload *offload, unsigned int n)
/* There was a problem reading the mailbox, propagate
* error value.
*/
if (unlikely(IS_ERR(skb))) {
if (IS_ERR(skb)) {
offload->dev->stats.rx_dropped++;
offload->dev->stats.rx_fifo_errors++;

Expand Down

0 comments on commit ecbaf5e

Please sign in to comment.