aboutsummaryrefslogtreecommitdiffstats
path: root/sound/atmel
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2012-08-19 03:02:58 -0400
committerTakashi Iwai <tiwai@suse.de>2012-08-20 04:53:13 -0400
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 98554f4882b7..277ebce23a45 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)
452 dac->regs = ioremap(regs->start, resource_size(regs)); 452 dac->regs = ioremap(regs->start, resource_size(regs));
453 if (!dac->regs) { 453 if (!dac->regs) {
454 dev_dbg(&pdev->dev, "could not remap register memory\n"); 454 dev_dbg(&pdev->dev, "could not remap register memory\n");
455 retval = -ENOMEM;
455 goto out_free_card; 456 goto out_free_card;
456 } 457 }
457 458