mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-27 20:25:09 +07:00
staging: vc04_services: Prefer WARN_ON_ONCE instead of if condition followed by BUG.
Coccinelle suggested to use BUG_ON instead of if condition followed by BUG but BUG_ON should be used in situations where integrity of the system is no longer guaranteed. In this case, as suggested by Stefan Wahren, vchiq isn't critical. Since it is not critical, BUG_ON should be avoided. Replaced if condition followed by BUG with WARN_ON_ONCE. Signed-off-by: Kishore KP <kishore.p@techveda.org> Signed-off-by: Suniel Mahesh <sunil.m@techveda.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
886654d7e3
commit
afe65e430d
@ -224,8 +224,7 @@ vchiq_platform_get_arm_state(VCHIQ_STATE_T *state)
|
||||
|
||||
platform_state = (struct vchiq_2835_state *)state->platform_state;
|
||||
|
||||
if (!platform_state->inited)
|
||||
BUG();
|
||||
WARN_ON_ONCE(!platform_state->inited);
|
||||
|
||||
return &platform_state->arm_state;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user