From patchwork Fri May 7 08:39: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: 97666 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 o479Oju9012952 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 7 May 2010 09:25:42 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-0005pi-5i; Fri, 07 May 2010 09:23:00 +0000 Received: from sfi-mx-1.v28.ch3.sourceforge.com ([172.29.28.121] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1OAJ5U-00064U-4A for dri-devel@lists.sourceforge.net; Fri, 07 May 2010 08:39:12 +0000 Received-SPF: pass (sfi-mx-1.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-1.v28.ch3.sourceforge.com with esmtp (Exim 4.69) id 1OAJ5S-0003pN-VQ for dri-devel@lists.sourceforge.net; Fri, 07 May 2010 08:39:11 +0000 Received: by wyf22 with SMTP id 22so533078wyf.34 for ; Fri, 07 May 2010 01:39:05 -0700 (PDT) Received: by 10.227.132.139 with SMTP id b11mr5275624wbt.169.1273221545177; Fri, 07 May 2010 01:39:05 -0700 (PDT) Received: from bicker ([205.177.176.130]) by mx.google.com with ESMTPS id z33sm14066375wbd.1.2010.05.07.01.39.00 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 07 May 2010 01:39:04 -0700 (PDT) Date: Fri, 7 May 2010 10:39:00 +0200 From: Dan Carpenter To: David Airlie Subject: [patch -next] i915: remove unneeded null checks Message-ID: <20100507083900.GY27064@bicker> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-Spam-Score: 3.0 (+++) 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] -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 RCVD_IN_PSBL RBL: Received via a relay in PSBL [205.177.176.130 listed in psbl.surriel.com] 1.5 SF_NO_SPF_SPAM SF_NO_SPF_SPAM 0.4 AWL AWL: From: address is in the auto white-list X-Headers-End: 1OAJ5S-0003pN-VQ X-Mailman-Approved-At: Fri, 07 May 2010 09:22:59 +0000 Cc: Keith Packard , dri-devel@lists.sourceforge.net 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:46 +0000 (UTC) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index f6299bb..950dc8d 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -576,7 +576,7 @@ intel_dp_set_m_n(struct drm_crtc *crtc, struct drm_display_mode *mode, struct intel_encoder *intel_encoder; struct intel_dp_priv *dp_priv; - if (!encoder || encoder->crtc != crtc) + if (encoder->crtc != crtc) continue; intel_encoder = enc_to_intel_encoder(encoder); @@ -1352,7 +1352,7 @@ intel_trans_dp_port_sel (struct drm_crtc *crtc) struct intel_encoder *intel_encoder = NULL; list_for_each_entry(encoder, &mode_config->encoder_list, head) { - if (!encoder || encoder->crtc != crtc) + if (encoder->crtc != crtc) continue; intel_encoder = enc_to_intel_encoder(encoder);