Commit a029ef45 authored by Takashi Iwai's avatar Takashi Iwai Committed by Mark Brown

ASoC: tas571x: Kill BUG_ON() usage

Don't use BUG_ON() for a non-critical sanity check on production
systems.  This patch replaces with a softer WARN_ON() and an error
path.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 2bd6bf03
......@@ -697,7 +697,8 @@ static int tas571x_i2c_probe(struct i2c_client *client,
return PTR_ERR(priv->mclk);
}
BUG_ON(priv->chip->num_supply_names > TAS571X_MAX_SUPPLIES);
if (WARN_ON(priv->chip->num_supply_names > TAS571X_MAX_SUPPLIES))
return -EINVAL;
for (i = 0; i < priv->chip->num_supply_names; i++)
priv->supplies[i].supply = priv->chip->supply_names[i];
......
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