aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/txx9/txx9aclc-ac97.c
diff options
context:
space:
mode:
authorJames Morris <james.l.morris@oracle.com>2014-04-14 11:23:14 +1000
committerJames Morris <james.l.morris@oracle.com>2014-04-14 11:23:14 +1000
commitecd740c6f2f092b90b95fa35f757973589eaaca2 (patch)
treece02b1e18c4fc5729699251460cd8be7604d8401 /sound/soc/txx9/txx9aclc-ac97.c
parentselinux: correctly label /proc inodes in use before the policy is loaded (diff)
parentLinux 3.14 (diff)
downloadlinux-dev-ecd740c6f2f092b90b95fa35f757973589eaaca2.tar.xz
linux-dev-ecd740c6f2f092b90b95fa35f757973589eaaca2.zip
Merge commit 'v3.14' into next
Diffstat (limited to 'sound/soc/txx9/txx9aclc-ac97.c')
-rw-r--r--sound/soc/txx9/txx9aclc-ac97.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/soc/txx9/txx9aclc-ac97.c b/sound/soc/txx9/txx9aclc-ac97.c
index e0305a148568..9edd68db9f48 100644
--- a/sound/soc/txx9/txx9aclc-ac97.c
+++ b/sound/soc/txx9/txx9aclc-ac97.c
@@ -183,14 +183,16 @@ 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);
drvdata->base = devm_ioremap_resource(&pdev->dev, r);
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) &&