From: Daniel Vetter Subject: Re: [PATCH V2 RESEND] drm_crtc: check if fb_create return NULL Date: Wed, 23 Jan 2013 10:53:37 +0100 Message-ID: <20130123095337.GQ31870@phenom.ffwll.local> References: <1358911167.18561.20.camel@suxuemin.sh.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ee0-f45.google.com (mail-ee0-f45.google.com [74.125.83.45]) by gabe.freedesktop.org (Postfix) with ESMTP id 13053E6B18 for ; Wed, 23 Jan 2013 01:51:32 -0800 (PST) Received: by mail-ee0-f45.google.com with SMTP id b57so4020007eek.32 for ; Wed, 23 Jan 2013 01:51:32 -0800 (PST) Content-Disposition: inline In-Reply-To: <1358911167.18561.20.camel@suxuemin.sh.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: "Su, Xuemin" Cc: bo.he@intel.com, yanmin_zhang@linux.intel.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On Wed, Jan 23, 2013 at 11:19:27AM +0800, Su, Xuemin wrote: > From: xueminsu > Date: Tue, 22 Jan 2013 22:39:39 +0800 > Subject: [PATCH] drm_crtc: check if fb_create return NULL > > Some buggy driver may still return NULL in fb_create, > which leads to kernel panic. > > Signed-off-by: xueminsu Imo just BUG_ON(!fb); and call it a day. Makes it pretty clear what's expected of the drivers. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch