snd_BUG_ON()
macro is similar with
WARN_ON()
macro. For example,
snd_BUG_ON(!pointer);
or it can be used as the condition,
if (snd_BUG_ON(non_zero_is_bug)) return -EINVAL;
The macro takes an conditional expression to evaluate.
When CONFIG_SND_DEBUG
, is set, if the
expression is non-zero, it shows the warning message such as
BUG? (xxx)
normally followed by stack trace.
In both cases it returns the evaluated value.