aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/txx9/txx9aclc-ac97.c
diff options
context:
space:
mode:
authorPaul Moore <pmoore@redhat.com>2014-03-31 09:49:07 -0400
committerPaul Moore <pmoore@redhat.com>2014-03-31 09:49:07 -0400
commit6d32c850621b0be75777b9102b14f6268bbd9f0f (patch)
treefec325f5c1ae763f5eccb3ca1254ab9d9d164b05 /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-6d32c850621b0be75777b9102b14f6268bbd9f0f.tar.xz
linux-dev-6d32c850621b0be75777b9102b14f6268bbd9f0f.zip
Merge tag 'v3.14' into next
Linux 3.14
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) &&