summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2022-04-05 00:18:51 +0300
committerArnd Bergmann <arnd@arndb.de>2022-04-21 16:00:27 +0300
commit7727adb97a6c4e9f14efa42c795650a51778e782 (patch)
tree2b136c4d5a80390c6c90d99557043e8b1ec8985d /drivers/video
parent3123109284176b1532874591f7c81f3837bbdc17 (diff)
downloadlinux-7727adb97a6c4e9f14efa42c795650a51778e782.tar.xz
video: fbdev: omapfb: lcd_ams_delta: fix unused variable warning
A recent cleanup patch removed the only reference to a local variable in some configurations. Move the variable into the one block it is still used in, inside of an #ifdef, to avoid this warning. Fixes: 9d773f103b89 ("video: fbdev: omapfb: lcd_ams_delta: Make use of the helper function dev_err_probe()") Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/omap/lcd_ams_delta.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/fbdev/omap/lcd_ams_delta.c b/drivers/video/fbdev/omap/lcd_ams_delta.c
index bbf871f9d862..1bdfd14e9b75 100644
--- a/drivers/video/fbdev/omap/lcd_ams_delta.c
+++ b/drivers/video/fbdev/omap/lcd_ams_delta.c
@@ -128,7 +128,6 @@ static struct lcd_panel ams_delta_panel = {
static int ams_delta_panel_probe(struct platform_device *pdev)
{
struct lcd_device *lcd_device = NULL;
- int ret;
gpiod_vblen = devm_gpiod_get(&pdev->dev, "vblen", GPIOD_OUT_LOW);
if (IS_ERR(gpiod_vblen))
@@ -145,7 +144,8 @@ static int ams_delta_panel_probe(struct platform_device *pdev)
&ams_delta_lcd_ops);
if (IS_ERR(lcd_device)) {
- ret = PTR_ERR(lcd_device);
+ int ret = PTR_ERR(lcd_device);
+
dev_err(&pdev->dev, "failed to register device\n");
return ret;
}