Commit e37b624d authored by Wambui Karuga's avatar Wambui Karuga Committed by Rob Clark

drm/msm: use BUG_ON macro for debugging.

As the if statement only checks for the value of the offset_name
variable, it can be replaced by the more conscise BUG_ON macro for error
reporting.
Signed-off-by: default avatarWambui Karuga <wambui.karugax@gmail.com>
Reviewed-by: default avatarSean Paul <sean@poorly.run>
Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
parent 89048dd0
......@@ -340,10 +340,7 @@ OUT_PKT7(struct msm_ringbuffer *ring, uint8_t opcode, uint16_t cnt)
static inline bool adreno_reg_check(struct adreno_gpu *gpu,
enum adreno_regs offset_name)
{
if (offset_name >= REG_ADRENO_REGISTER_MAX ||
!gpu->reg_offsets[offset_name]) {
BUG();
}
BUG_ON(offset_name >= REG_ADRENO_REGISTER_MAX || !gpu->reg_offsets[offset_name]);
/*
* REG_SKIP is a special value that tell us that the register in
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment