[3.11.y.z extended stable] Patch "ASoC: txx9aclc_ac97: Fix kernel crash on probe" has been added to staging queue
Luis Henriques
luis.henriques at canonical.com
Wed Feb 26 12:22:43 UTC 2014
This is a note to let you know that I have just added a patch titled
ASoC: txx9aclc_ac97: Fix kernel crash on probe
to the linux-3.11.y-queue branch of the 3.11.y.z extended stable tree
which can be found at:
http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.11.y-queue
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.11.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Luis
------
>From 1535aa621e221f3f6ec10d20c0b01582a1c67d87 Mon Sep 17 00:00:00 2001
From: Alexander Shiyan <shc_work at mail.ru>
Date: Sat, 15 Feb 2014 23:28:29 +0400
Subject: ASoC: txx9aclc_ac97: Fix kernel crash on probe
commit 9febd494d15c4a351e9c9cae7184643144eea892 upstream.
This patch fixes a crash caused by commit 3bed3344c826
(ASoC: txx9aclc_ac97: Convert to devm_ioremap_resource()).
This is an attempt to assign "drvdata->base" while memory
for "drvdata" is not already allocated.
Fixes: 3bed3344c826 (ASoC: txx9aclc_ac97: Convert to devm_ioremap_resource())
Signed-off-by: Alexander Shiyan <shc_work at mail.ru>
Signed-off-by: Mark Brown <broonie at linaro.org>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
sound/soc/txx9/txx9aclc-ac97.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/sound/soc/txx9/txx9aclc-ac97.c b/sound/soc/txx9/txx9aclc-ac97.c
index 4bcce8a..91977ea 100644
--- a/sound/soc/txx9/txx9aclc-ac97.c
+++ b/sound/soc/txx9/txx9aclc-ac97.c
@@ -183,6 +183,11 @@ static int txx9aclc_ac97_dev_probe(struct platform_device *pdev)
irq = platform_get_irq(pdev, 0);
if (irq < 0)
return irq;
+
+ drvdata = devm_kzalloc(&pdev->dev, sizeof(*drvdata), GFP_KERNEL);
+ if (!drvdata)
+ return -ENOMEM;
+
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!r)
return -EBUSY;
@@ -191,9 +196,6 @@ static int txx9aclc_ac97_dev_probe(struct platform_device *pdev)
if (IS_ERR(drvdata->base))
return PTR_ERR(drvdata->base);
- drvdata = devm_kzalloc(&pdev->dev, sizeof(*drvdata), GFP_KERNEL);
- if (!drvdata)
- return -ENOMEM;
platform_set_drvdata(pdev, drvdata);
drvdata->physbase = r->start;
if (sizeof(drvdata->physbase) > sizeof(r->start) &&
--
1.9.0
More information about the kernel-team
mailing list