diff options
author | Peter Senna Tschudin <peter.senna@gmail.com> | 2012-09-18 08:07:55 -0400 |
---|---|---|
committer | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2012-09-22 17:41:52 -0400 |
commit | 130320bfe0ca88b0f80dde758a551b5beffb9f62 (patch) | |
tree | 3953894b61ba37105e6e6f0250846bbbb0466fcd /drivers | |
parent | b157dd1c38de2acad1b490851bab2244f4ef517a (diff) |
drivers/video/atmel_lcdfb.c: fix error return code
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
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: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/atmel_lcdfb.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c index 15055395cd95..94cac9f9919f 100644 --- a/drivers/video/atmel_lcdfb.c +++ b/drivers/video/atmel_lcdfb.c | |||
@@ -931,8 +931,10 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev) | |||
931 | } | 931 | } |
932 | 932 | ||
933 | info->screen_base = ioremap(info->fix.smem_start, info->fix.smem_len); | 933 | info->screen_base = ioremap(info->fix.smem_start, info->fix.smem_len); |
934 | if (!info->screen_base) | 934 | if (!info->screen_base) { |
935 | ret = -ENOMEM; | ||
935 | goto release_intmem; | 936 | goto release_intmem; |
937 | } | ||
936 | 938 | ||
937 | /* | 939 | /* |
938 | * Don't clear the framebuffer -- someone may have set | 940 | * Don't clear the framebuffer -- someone may have set |
@@ -960,6 +962,7 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev) | |||
960 | sinfo->mmio = ioremap(info->fix.mmio_start, info->fix.mmio_len); | 962 | sinfo->mmio = ioremap(info->fix.mmio_start, info->fix.mmio_len); |
961 | if (!sinfo->mmio) { | 963 | if (!sinfo->mmio) { |
962 | dev_err(dev, "cannot map LCDC registers\n"); | 964 | dev_err(dev, "cannot map LCDC registers\n"); |
965 | ret = -ENOMEM; | ||
963 | goto release_mem; | 966 | goto release_mem; |
964 | } | 967 | } |
965 | 968 | ||