Skip to content

Commit

Permalink
[PATCH] s1d13xxxfb: Fix resource leak
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Antonino A. Daplas authored and Linus Torvalds committed Mar 11, 2006
1 parent 939205b commit 98365f5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/video/s1d13xxxfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 98365f5

Please sign in to comment.