Эх сурвалжийг харах

ASoC: twl6040: Return -ENOMEM if create_singlethread_workqueue fails

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>
Axel Lin 14 жил өмнө
parent
commit
19aab08d69

+ 3 - 1
sound/soc/codecs/twl6040.c

@@ -1629,8 +1629,10 @@ static int twl6040_probe(struct snd_soc_codec *codec)
 	priv->naudint = naudint;
 	priv->naudint = naudint;
 	priv->workqueue = create_singlethread_workqueue("twl6040-codec");
 	priv->workqueue = create_singlethread_workqueue("twl6040-codec");
 
 
-	if (!priv->workqueue)
+	if (!priv->workqueue) {
+		ret = -ENOMEM;
 		goto work_err;
 		goto work_err;
+	}
 
 
 	INIT_DELAYED_WORK(&priv->delayed_work, twl6040_accessory_work);
 	INIT_DELAYED_WORK(&priv->delayed_work, twl6040_accessory_work);