This is a note to let you know that I've just added the patch titled
ASoC: tlv320aic31xx: Do not ignore errors in aic31xx_device_init()
to the 3.16-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
asoc-tlv320aic31xx-do-not-ignore-errors-in-aic31xx_device_init.patch
and it can be found in the queue-3.16 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From a72d2abbe5752f3a773c4d8b7b41ae41f617f772 Mon Sep 17 00:00:00 2001
From: Peter Ujfalusi <[email protected]>
Date: Fri, 25 Jul 2014 13:12:54 +0300
Subject: ASoC: tlv320aic31xx: Do not ignore errors in aic31xx_device_init()
From: Peter Ujfalusi <[email protected]>
commit a72d2abbe5752f3a773c4d8b7b41ae41f617f772 upstream.
We need to return the error codes from aic31xx_device_init() and return
from the i2c_probe with the error code.
We will have kernel panic (NULL pointer dereference) in
regulator_register_notifier() in case the devm_regulator_bulk_get() fails
(with -EPROBE_DEFER for example).
Signed-off-by: Peter Ujfalusi <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
sound/soc/codecs/tlv320aic31xx.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
--- a/sound/soc/codecs/tlv320aic31xx.c
+++ b/sound/soc/codecs/tlv320aic31xx.c
@@ -1178,7 +1178,7 @@ static void aic31xx_pdata_from_of(struct
}
#endif /* CONFIG_OF */
-static void aic31xx_device_init(struct aic31xx_priv *aic31xx)
+static int aic31xx_device_init(struct aic31xx_priv *aic31xx)
{
int ret, i;
@@ -1197,7 +1197,7 @@ static void aic31xx_device_init(struct a
"aic31xx-reset-pin");
if (ret < 0) {
dev_err(aic31xx->dev, "not able to acquire gpio\n");
- return;
+ return ret;
}
}
@@ -1210,6 +1210,7 @@ static void aic31xx_device_init(struct a
if (ret != 0)
dev_err(aic31xx->dev, "Failed to request supplies: %d\n", ret);
+ return ret;
}
static int aic31xx_i2c_probe(struct i2c_client *i2c,
@@ -1239,7 +1240,9 @@ static int aic31xx_i2c_probe(struct i2c_
aic31xx->pdata.codec_type = id->driver_data;
- aic31xx_device_init(aic31xx);
+ ret = aic31xx_device_init(aic31xx);
+ if (ret)
+ return ret;
return snd_soc_register_codec(&i2c->dev, &soc_codec_driver_aic31xx,
aic31xx_dai_driver,
Patches currently in stable-queue which might be from [email protected] are
queue-3.16/asoc-omap-twl4030-fix-typo-in-2nd-dai-link-s-platform_name.patch
queue-3.16/asoc-tlv320aic31xx-do-not-ignore-errors-in-aic31xx_device_init.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html