Commit 2df2c0ca authored by Markus Elfring's avatar Markus Elfring Committed by Helge Deller
Browse files

fbdev: au1100fb: Move a variable assignment behind a null pointer check



The address of a data structure member was determined before
a corresponding null pointer check in the implementation of
the function “au1100fb_setmode”.

This issue was detected by using the Coccinelle software.

Fixes: 3b495f2b ("Au1100 FB driver uplift for 2.6.")
Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Acked-by: default avatarUwe Kleine-König <u.kleine-koenig@baylibre.com>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent b347f457
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -137,13 +137,15 @@ static int au1100fb_fb_blank(int blank_mode, struct fb_info *fbi)
	 */
int au1100fb_setmode(struct au1100fb_device *fbdev)
{
	struct fb_info *info = &fbdev->info;
	struct fb_info *info;
	u32 words;
	int index;

	if (!fbdev)
		return -EINVAL;

	info = &fbdev->info;

	/* Update var-dependent FB info */
	if (panel_is_active(fbdev->panel) || panel_is_color(fbdev->panel)) {
		if (info->var.bits_per_pixel <= 8) {