Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1121a418 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Tomi Valkeinen
Browse files

video: ARM CLCD: fix endpoint lookup logic



The addition of the Nomadik support in this driver introduced
a bug in clcdfb_of_init_display(), which now calls init_panel
with an uninitialized 'endpoint' pointer, as "gcc -Wmaybe-uninitialized"
warns:

drivers/video/fbdev/amba-clcd.c: In function 'clcdfb_of_init_display':
drivers/video/fbdev/amba-clcd.c:785:5: error: 'endpoint' may be used uninitialized in this function [-Werror=maybe-uninitialized]

This reverts the broken part of the function to what it was before
the patch, which is the best guess I have to what it should be.
I assume this was left over from an attempted rework of the
code that was partially backed out.

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Fixes: 046ad6cd ("video: ARM CLCD: support Nomadik variant")
Cc: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Reported-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent e0299908
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -782,12 +782,9 @@ static int clcdfb_of_init_display(struct clcd_fb *fb)
	/*
	 * Fetch the panel endpoint.
	 */
	if (!endpoint) {
		endpoint = of_graph_get_next_endpoint(fb->dev->dev.of_node,
						      NULL);
	endpoint = of_graph_get_next_endpoint(fb->dev->dev.of_node, NULL);
	if (!endpoint)
		return -ENODEV;
	}

	if (fb->vendor->init_panel) {
		err = fb->vendor->init_panel(fb, endpoint);