From patchwork Wed Jul 10 11:16:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 2825621 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id ECCDAC0AB2 for ; Wed, 10 Jul 2013 11:23:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 55DF42018F for ; Wed, 10 Jul 2013 11:23:00 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id CFBEA20189 for ; Wed, 10 Jul 2013 11:22:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E3981E61F7 for ; Wed, 10 Jul 2013 04:22:54 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 301 seconds by postgrey-1.32 at gabe; Wed, 10 Jul 2013 04:21:44 PDT Received: from georges.telenet-ops.be (georges.telenet-ops.be [195.130.137.68]) by gabe.freedesktop.org (Postfix) with ESMTP id 2232DE5CC6 for ; Wed, 10 Jul 2013 04:21:43 -0700 (PDT) Received: from ayla.of.borg ([84.193.72.141]) by georges.telenet-ops.be with bizsmtp id ybGh1l00s32ts5g06bGhED; Wed, 10 Jul 2013 13:16:42 +0200 Received: from geert by ayla.of.borg with local (Exim 4.76) (envelope-from ) id 1UwsO1-0005eh-NR; Wed, 10 Jul 2013 13:16:41 +0200 From: Geert Uytterhoeven To: David Airlie Subject: [PATCH 2/3] drm/edid: Fix uninitialized return variable in edid_load() Date: Wed, 10 Jul 2013 13:16:35 +0200 Message-Id: <1373454996-21706-2-git-send-email-geert@linux-m68k.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1373454996-21706-1-git-send-email-geert@linux-m68k.org> References: <1373454996-21706-1-git-send-email-geert@linux-m68k.org> MIME-Version: 1.0 Cc: Geert Uytterhoeven , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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;