diff options
author | Antonino A. Daplas <adaplas@gmail.com> | 2006-03-11 12:27:23 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-11 18:19:35 +0100 |
commit | 98365f5eb47e23d6ac1244da556984a74260021e (patch) | |
tree | 033e9f8ad33c168a6381fa41a082aedf4d0182c8 /drivers/video/s1d13xxxfb.c | |
parent | [PATCH] arcfb: Fix dereference before NULL check (diff) | |
download | linux-98365f5eb47e23d6ac1244da556984a74260021e.tar.xz linux-98365f5eb47e23d6ac1244da556984a74260021e.zip |
[PATCH] s1d13xxxfb: Fix resource leak
struct info may not be released in the driver's error path.
Coverity Bug 672
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video/s1d13xxxfb.c')
-rw-r--r-- | drivers/video/s1d13xxxfb.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/video/s1d13xxxfb.c b/drivers/video/s1d13xxxfb.c index e5d0f92eeae3..feec47bdd479 100644 --- a/drivers/video/s1d13xxxfb.c +++ b/drivers/video/s1d13xxxfb.c @@ -588,6 +588,7 @@ s1d13xxxfb_probe(struct platform_device *pdev) goto bail; } + platform_set_drvdata(pdev, info); default_par = info->par; default_par->regs = ioremap_nocache(pdev->resource[1].start, pdev->resource[1].end - pdev->resource[1].start +1); @@ -638,8 +639,6 @@ s1d13xxxfb_probe(struct platform_device *pdev) goto bail; } - platform_set_drvdata(pdev, info); - printk(KERN_INFO "fb%d: %s frame buffer device\n", info->node, info->fix.id); |