From patchwork Fri May 7 08:41:00 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 97663 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o479ONWx012876 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 7 May 2010 09:24:59 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-3.v29.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1OAJls-0005px-C3; Fri, 07 May 2010 09:23:00 +0000 Received: from sfi-mx-3.v28.ch3.sourceforge.com ([172.29.28.123] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1OAJ7P-0005bt-F3 for dri-devel@lists.sourceforge.net; Fri, 07 May 2010 08:41:11 +0000 Received-SPF: pass (sfi-mx-3.v28.ch3.sourceforge.com: domain of gmail.com designates 74.125.82.175 as permitted sender) client-ip=74.125.82.175; envelope-from=error27@gmail.com; helo=mail-wy0-f175.google.com; Received: from mail-wy0-f175.google.com ([74.125.82.175]) by sfi-mx-3.v28.ch3.sourceforge.com with esmtp (Exim 4.69) id 1OAJ7O-0000MN-N3 for dri-devel@lists.sourceforge.net; Fri, 07 May 2010 08:41:11 +0000 Received: by wyf22 with SMTP id 22so534037wyf.34 for ; Fri, 07 May 2010 01:41:05 -0700 (PDT) Received: by 10.227.154.15 with SMTP id m15mr5327393wbw.96.1273221664186; Fri, 07 May 2010 01:41:04 -0700 (PDT) Received: from bicker ([205.177.176.130]) by mx.google.com with ESMTPS id r29sm14044528wbv.15.2010.05.07.01.41.00 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 07 May 2010 01:41:03 -0700 (PDT) Date: Fri, 7 May 2010 10:41:00 +0200 From: Dan Carpenter To: David Airlie Subject: [patch -next] drm: dereferencing before checking for null Message-ID: <20100507084100.GA27064@bicker> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-Spam-Score: 2.9 (++) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain 1.1 RCVD_IN_SORBS_WEB RBL: SORBS: sender is a abuseable web server [205.177.176.130 listed in dnsbl.sorbs.net] 1.5 RCVD_IN_PSBL RBL: Received via a relay in PSBL [205.177.176.130 listed in psbl.surriel.com] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 DKIM_VERIFIED Domain Keys Identified Mail: signature passes verification 0.0 DKIM_SIGNED Domain Keys Identified Mail: message has a signature 1.5 SF_NO_SPF_SPAM SF_NO_SPF_SPAM 0.3 AWL AWL: From: address is in the auto white-list X-Headers-End: 1OAJ7O-0000MN-N3 X-Mailman-Approved-At: Fri, 07 May 2010 09:22:59 +0000 Cc: Dave Airlie , dri-devel@lists.sourceforge.net, Clemens Ladisch , Jesse Barnes X-BeenThere: dri-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.sourceforge.net X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 07 May 2010 09:25:13 +0000 (UTC) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index b28e563..f5fe3a9 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -96,11 +96,12 @@ static bool drm_fb_helper_connector_parse_command_line(struct drm_fb_helper_conn int i; enum drm_connector_force force = DRM_FORCE_UNSPECIFIED; struct drm_fb_helper_cmdline_mode *cmdline_mode; - struct drm_connector *connector = fb_helper_conn->connector; + struct drm_connector *connector; if (!fb_helper_conn) return false; + connector = fb_helper_conn->connector; cmdline_mode = &fb_helper_conn->cmdline_mode; if (!mode_option) mode_option = fb_mode_option;