Commit c244f8e4 authored by Russell King's avatar Russell King Committed by Bartlomiej Zolnierkiewicz

video: sa1100fb: clean up failure path

We merely return from the failed path, so remove all the gotos and use
return statements instead.
Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
parent 5634cbab
...@@ -1222,41 +1222,36 @@ static int sa1100fb_probe(struct platform_device *pdev) ...@@ -1222,41 +1222,36 @@ static int sa1100fb_probe(struct platform_device *pdev)
return -EINVAL; return -EINVAL;
fbi = sa1100fb_init_fbinfo(&pdev->dev); fbi = sa1100fb_init_fbinfo(&pdev->dev);
ret = -ENOMEM;
if (!fbi) if (!fbi)
goto failed; return -ENOMEM;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
fbi->base = devm_ioremap_resource(&pdev->dev, res); fbi->base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(fbi->base)) { if (IS_ERR(fbi->base))
ret = PTR_ERR(fbi->base); return PTR_ERR(fbi->base);
goto failed;
}
fbi->clk = devm_clk_get(&pdev->dev, NULL); fbi->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(fbi->clk)) { if (IS_ERR(fbi->clk))
ret = PTR_ERR(fbi->clk); return PTR_ERR(fbi->clk);
goto failed;
}
ret = devm_request_irq(&pdev->dev, irq, sa1100fb_handle_irq, 0, ret = devm_request_irq(&pdev->dev, irq, sa1100fb_handle_irq, 0,
"LCD", fbi); "LCD", fbi);
if (ret) { if (ret) {
dev_err(&pdev->dev, "request_irq failed: %d\n", ret); dev_err(&pdev->dev, "request_irq failed: %d\n", ret);
goto failed; return ret;
} }
if (machine_is_shannon()) { if (machine_is_shannon()) {
ret = devm_gpio_request_one(&pdev->dev, SHANNON_GPIO_DISP_EN, ret = devm_gpio_request_one(&pdev->dev, SHANNON_GPIO_DISP_EN,
GPIOF_OUT_INIT_LOW, "display enable"); GPIOF_OUT_INIT_LOW, "display enable");
if (ret) if (ret)
goto failed; return ret;
} }
/* Initialize video memory */ /* Initialize video memory */
ret = sa1100fb_map_video_memory(fbi); ret = sa1100fb_map_video_memory(fbi);
if (ret) if (ret)
goto failed; return ret;
/* /*
* This makes sure that our colour bitfield * This makes sure that our colour bitfield
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment