ALSA: sound/atmel/abdac.c: fix error return code
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sun, 19 Aug 2012 07:02:58 +0000 (09:02 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 20 Aug 2012 08:53:13 +0000 (10:53 +0200)
commitaaf265c22e48f10c94ad04d23b6ab0c88f554d35
treed025c650cf3777aa1ba6e02289e2e140742950fe
parent8513915accc611e576dbebb93422c257e7e68be8
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>
sound/atmel/abdac.c