summaryrefslogtreecommitdiffstats
path: root/drivers/video/fbdev/sa1100fb.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2017-10-17 16:01:12 +0200
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2017-10-17 16:01:12 +0200
commitc244f8e48c9f1875101201eaa0ecd2bfb17a5405 (patch)
tree6b4937e0b6b24a6dbd287a8cb6222c6afb536a69 /drivers/video/fbdev/sa1100fb.c
parentvideo: sa1100fb: use devm_gpio_request_one() (diff)
downloadlinux-c244f8e48c9f1875101201eaa0ecd2bfb17a5405.tar.xz
linux-c244f8e48c9f1875101201eaa0ecd2bfb17a5405.zip
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: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Diffstat (limited to 'drivers/video/fbdev/sa1100fb.c')
-rw-r--r--drivers/video/fbdev/sa1100fb.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/drivers/video/fbdev/sa1100fb.c b/drivers/video/fbdev/sa1100fb.c
index 7fa6c8f74ec6..16a974471c02 100644
--- a/drivers/video/fbdev/sa1100fb.c
+++ b/drivers/video/fbdev/sa1100fb.c
@@ -1222,41 +1222,36 @@ static int sa1100fb_probe(struct platform_device *pdev)
return -EINVAL;
fbi = sa1100fb_init_fbinfo(&pdev->dev);
- ret = -ENOMEM;
if (!fbi)
- goto failed;
+ return -ENOMEM;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
fbi->base = devm_ioremap_resource(&pdev->dev, res);
- if (IS_ERR(fbi->base)) {
- ret = PTR_ERR(fbi->base);
- goto failed;
- }
+ if (IS_ERR(fbi->base))
+ return PTR_ERR(fbi->base);
fbi->clk = devm_clk_get(&pdev->dev, NULL);
- if (IS_ERR(fbi->clk)) {
- ret = PTR_ERR(fbi->clk);
- goto failed;
- }
+ if (IS_ERR(fbi->clk))
+ return PTR_ERR(fbi->clk);
ret = devm_request_irq(&pdev->dev, irq, sa1100fb_handle_irq, 0,
"LCD", fbi);
if (ret) {
dev_err(&pdev->dev, "request_irq failed: %d\n", ret);
- goto failed;
+ return ret;
}
if (machine_is_shannon()) {
ret = devm_gpio_request_one(&pdev->dev, SHANNON_GPIO_DISP_EN,
GPIOF_OUT_INIT_LOW, "display enable");
if (ret)
- goto failed;
+ return ret;
}
/* Initialize video memory */
ret = sa1100fb_map_video_memory(fbi);
if (ret)
- goto failed;
+ return ret;
/*
* This makes sure that our colour bitfield