From: Axel Lin Date: Sat, 26 Mar 2011 07:53:58 +0000 (+0800) Subject: ASoC: twl6040: Return -ENOMEM if create_singlethread_workqueue fails X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=19aab08d69e05c8d9a9ad315e59dd0493bf86045;p=linux-beck.git ASoC: twl6040: Return -ENOMEM if create_singlethread_workqueue fails Signed-off-by: Axel Lin Acked-by: Mark Brown Signed-off-by: Liam Girdwood --- diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c index 482fcdb59bfa..255901c4460d 100644 --- a/sound/soc/codecs/twl6040.c +++ b/sound/soc/codecs/twl6040.c @@ -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);