diff options
-rw-r--r-- | sound/soc/codecs/tas571x.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/codecs/tas571x.c b/sound/soc/codecs/tas571x.c index 810369f687d7..a09499977be4 100644 --- a/sound/soc/codecs/tas571x.c +++ b/sound/soc/codecs/tas571x.c | |||
@@ -697,7 +697,8 @@ static int tas571x_i2c_probe(struct i2c_client *client, | |||
697 | return PTR_ERR(priv->mclk); | 697 | return PTR_ERR(priv->mclk); |
698 | } | 698 | } |
699 | 699 | ||
700 | BUG_ON(priv->chip->num_supply_names > TAS571X_MAX_SUPPLIES); | 700 | if (WARN_ON(priv->chip->num_supply_names > TAS571X_MAX_SUPPLIES)) |
701 | return -EINVAL; | ||
701 | for (i = 0; i < priv->chip->num_supply_names; i++) | 702 | for (i = 0; i < priv->chip->num_supply_names; i++) |
702 | priv->supplies[i].supply = priv->chip->supply_names[i]; | 703 | priv->supplies[i].supply = priv->chip->supply_names[i]; |
703 | 704 | ||