BUG() used in the driver is just to spit the stack trace on buggy
points, not really needed to stop the whole operation. For that
purpose, it'd be more convenient to use WARN() instead with more
error information.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
break;
}
default:
- BUG();
+ WARN(1, "Invalid word_size %d\n", word_size);
+ break;
}
return false;
}
return cache[idx];
}
default:
- BUG();
+ WARN(1, "Invalid word_size %d\n", word_size);
+ break;
}
/* unreachable */
return -1;
power = 0;
break;
default:
- BUG();
+ WARN(1, "Unknown event %d\n", event);
return;
}
level = "Off\n";
break;
default:
- BUG();
+ WARN(1, "Unknown bias_level %d\n", dapm->bias_level);
level = "Unknown\n";
break;
}
break;
default:
- BUG();
+ WARN(1, "Unknown event %d\n", event);
return -EINVAL;
}