From: Peter Ujfalusi Date: Wed, 5 Oct 2011 07:29:28 +0000 (+0300) Subject: ASoC: twl6040: Warn user in twl6040_put_volsw for error case X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a0acf47f1b986a89026a26fc0365b4ed2f65cd85;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 --- diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c index 7450e1bb8164..62edded0b549 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; }