This bug caused the release function being called on the first
uninitialized window, instead of starting with the last successfully
initialized one.
Reviewed-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Pawel Osciak <redacted>
diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
index bb63c07..ff0b1a3 100644
--- a/drivers/video/s3c-fb.c
+++ b/drivers/video/s3c-fb.c
@@ -926,7 +926,7 @@ static int __devinit s3c_fb_probe(struct platform_device *pdev)
ret = s3c_fb_probe_win(sfb, win, &sfb->windows[win]);
if (ret < 0) {
dev_err(dev, "failed to create window %d\n", win);
- for (; win >= 0; win--)
+ for ( win = win - 1; win >= 0; win--)
s3c_fb_release_win(sfb, sfb->windows[win]);
goto err_ioremap;
}
-------------------------------------------------------------------List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php