]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit997f3df818d51f6b3420ab7adf72a7e4b01db59f
treefc21233f71eb6188dda6c97f3a4396a0512a2b22
parentc85627f6f3a7d37ea5feb804d79e0fe1c561c5bd
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