From a0acf47f1b986a89026a26fc0365b4ed2f65cd85 Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Wed, 5 Oct 2011 10:29:28 +0300 Subject: [PATCH] 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 Signed-off-by: Mark Brown --- sound/soc/codecs/twl6040.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c index 7450e1bb816..62edded0b54 100644 --- a/sound/soc/codecs/twl6040.c +++ b/sound/soc/codecs/twl6040.c @@ -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; } -- 2.41.0