video: ffb: fix ffb_probe error path
authoraxel lin <axel.lin@gmail.com>
Tue, 8 Feb 2011 14:58:45 +0000 (14:58 +0000)
committerPaul Mundt <lethal@linux-sh.org>
Tue, 22 Mar 2011 07:18:51 +0000 (16:18 +0900)
Current implementation calls of_iounmap for par->fbc twice in error path.
In the case of goto out_unmap_dac, we should call of_iounmap for par->dac.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
drivers/video/ffb.c

index 910c5e6f67021e3281bcd10be1a5b4ef8d490e42..14102a3f70f5cc69bd19963919bad3522a2cda06 100644 (file)
@@ -1010,7 +1010,7 @@ out_dealloc_cmap:
        fb_dealloc_cmap(&info->cmap);
 
 out_unmap_dac:
-       of_iounmap(&op->resource[2], par->fbc, sizeof(struct ffb_fbc));
+       of_iounmap(&op->resource[1], par->dac, sizeof(struct ffb_dac));
 
 out_unmap_fbc:
        of_iounmap(&op->resource[2], par->fbc, sizeof(struct ffb_fbc));