linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] video: ffb: fix ffb_probe error path
@ 2011-02-08 14:58 Axel Lin
  2011-02-08 19:41 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2011-02-08 14:58 UTC (permalink / raw)
  To: linux-kernel; +Cc: David S. Miller, Paul Mundt, linux-fbdev

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>
---
 drivers/video/ffb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/video/ffb.c b/drivers/video/ffb.c
index 6739b2a..b5d6a46 100644
--- a/drivers/video/ffb.c
+++ b/drivers/video/ffb.c
@@ -1011,7 +1011,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));
-- 
1.7.1




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] video: ffb: fix ffb_probe error path
  2011-02-08 14:58 [PATCH] video: ffb: fix ffb_probe error path Axel Lin
@ 2011-02-08 19:41 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-02-08 19:41 UTC (permalink / raw)
  To: axel.lin; +Cc: linux-kernel, lethal, linux-fbdev

From: Axel Lin <axel.lin@gmail.com>
Date: Tue, 08 Feb 2011 22:58:45 +0800

> 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>

Good spotting:

Acked-by: David S. Miller <davem@davemloft.net>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-08 19:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-08 14:58 [PATCH] video: ffb: fix ffb_probe error path Axel Lin
2011-02-08 19:41 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).