From: Antonino A. Daplas Date: Sat, 11 Mar 2006 11:27:23 +0000 (-0800) Subject: [PATCH] s1d13xxxfb: Fix resource leak X-Git-Tag: v2.6.16-rc6~13 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98365f5eb47e23d6ac1244da556984a74260021e;p=linux-2.6 [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/s1d13xxxfb.c b/drivers/video/s1d13xxxfb.c index e5d0f92eea..feec47bdd4 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);