net: bcmgenet: Use BUG_ON instead of if condition followed by BUG
authorGustavo A. R. Silva <garsilva@embeddedor.com>
Thu, 26 Oct 2017 12:16:01 +0000 (07:16 -0500)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 Oct 2017 14:52:36 +0000 (23:52 +0900)
commit4fa112f6b5fb055478e76f2b446673565d2ea35f
treefc21233f71eb6188dda6c97f3a4396a0512a2b22
parent42c8ae1137173964d48fd040cbb85027125e6a5c
net: bcmgenet: Use BUG_ON instead of if condition followed by BUG

Use BUG_ON instead of if condition followed by BUG.

Something to notice in this particular case is that unlikely()
is already being called inside BUG_ON macro.

This issue was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/genet/bcmgenet.c