ASoC: twl6040: Warn user in twl6040_put_volsw for error case

Let the user know, that the callback has been called with unexpected
register parameter.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
Peter Ujfalusi 2011-10-05 10:29:28 +03:00 committed by Mark Brown
parent 1576a5ff49
commit a0acf47f1b

View File

@ -759,6 +759,8 @@ static int twl6040_put_volsw(struct snd_kcontrol *kcontrol,
out = &twl6040_priv->handsfree;
break;
default:
dev_warn(codec->dev, "%s: Unexpected register: 0x%02x\n",
__func__, mc->reg);
return -EINVAL;
}