Skip to content

Commit

Permalink
ASoC: twl6040: Warn user in twl6040_put_volsw for error case
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Ujfalusi authored and Mark Brown committed Oct 5, 2011
1 parent 1576a5f commit a0acf47
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sound/soc/codecs/twl6040.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit a0acf47

Please sign in to comment.