summaryrefslogtreecommitdiffstats
path: root/sound/atmel
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2012-08-19 09:02:58 +0200
committerTakashi Iwai <tiwai@suse.de>2012-08-20 10:53:13 +0200
commitaaf265c22e48f10c94ad04d23b6ab0c88f554d35 (patch)
treed025c650cf3777aa1ba6e02289e2e140742950fe /sound/atmel
parent8513915accc611e576dbebb93422c257e7e68be8 (diff)
ALSA: sound/atmel/abdac.c: fix error return code
Initialize retval before returning from a failed call to ioremap. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != ret = e1 when != &ret *if(...) { ... when != ret = e2 when forall return ret; } // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/atmel')
-rw-r--r--sound/atmel/abdac.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/atmel/abdac.c b/sound/atmel/abdac.c
index 98554f4882b..277ebce23a4 100644
--- a/sound/atmel/abdac.c
+++ b/sound/atmel/abdac.c
@@ -452,6 +452,7 @@ static int __devinit atmel_abdac_probe(struct platform_device *pdev)
dac->regs = ioremap(regs->start, resource_size(regs));
if (!dac->regs) {
dev_dbg(&pdev->dev, "could not remap register memory\n");
+ retval = -ENOMEM;
goto out_free_card;
}