[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1373454996-21706-2-git-send-email-geert@linux-m68k.org>
Date: Wed, 10 Jul 2013 13:16:35 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: David Airlie <airlied@...ux.ie>
Cc: dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
Geert Uytterhoeven <geert@...ux-m68k.org>
Subject: [PATCH 2/3] drm/edid: Fix uninitialized return variable in edid_load()
drivers/gpu/drm/drm_edid_load.c: In function ‘edid_load’:
drivers/gpu/drm/drm_edid_load.c:141: warning: ‘edid’ may be used uninitialized
in this function
In some error cases, edid_load() will return the uninitialized variable.
Initialize it to NULL to fix this.
Signed-off-by: Geert Uytterhoeven <geert@...ux-m68k.org>
---
drivers/gpu/drm/drm_edid_load.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_edid_load.c b/drivers/gpu/drm/drm_edid_load.c
index 2c2803f..9be3467 100644
--- a/drivers/gpu/drm/drm_edid_load.c
+++ b/drivers/gpu/drm/drm_edid_load.c
@@ -138,7 +138,7 @@ static u8 *edid_load(struct drm_connector *connector, char *name,
{
const struct firmware *fw;
struct platform_device *pdev;
- u8 *fwdata = NULL, *edid, *new_edid;
+ u8 *fwdata = NULL, *edid = NULL, *new_edid;
int fwsize, expected;
int builtin = 0, err = 0;
int i, valid_extensions = 0;
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists