Skip to content

Commit

Permalink
ASoC: twl6040: Return -ENOMEM if create_singlethread_workqueue fails
Browse files Browse the repository at this point in the history
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
  • Loading branch information
Axel Lin authored and Liam Girdwood committed Mar 26, 2011
1 parent 56a3536 commit 19aab08
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sound/soc/codecs/twl6040.c
Original file line number Diff line number Diff line change
Expand Up @@ -1629,8 +1629,10 @@ static int twl6040_probe(struct snd_soc_codec *codec)
priv->naudint = naudint;
priv->workqueue = create_singlethread_workqueue("twl6040-codec");

if (!priv->workqueue)
if (!priv->workqueue) {
ret = -ENOMEM;
goto work_err;
}

INIT_DELAYED_WORK(&priv->delayed_work, twl6040_accessory_work);

Expand Down

0 comments on commit 19aab08

Please sign in to comment.