]> git.baikalelectronics.ru Git - kernel.git/commit
switchdev: change BUG_ON to WARN for attr set failure case
authorScott Feldman <sfeldma@gmail.com>
Thu, 11 Jun 2015 18:20:42 +0000 (11:20 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 Jun 2015 13:57:17 +0000 (06:57 -0700)
commit955c79b4c5851f661cf544c398ad12777003da40
tree0f64fa084a34b501ec84856d8d71f440ba519eba
parent1ed5baacc07a8d21c7f66c687e56703c8c746ec4
switchdev: change BUG_ON to WARN for attr set failure case

This particular BUG_ON condition was checking for attr set err in the
COMMIT phase, which isn't expected (it's a driver bug if PREPARE phase is
OK but COMMIT fails).  But BUG_ON() is too strong for this case, so change
to WARN().  BUG_ON() would be warranted if the system was corrupted beyond
repair, but this is not the case here.

Signed-off-by: Scott Feldman <sfeldma@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/switchdev/switchdev.c