public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: "Su\, Xuemin" <xuemin.su@intel.com>
Cc: airlied@linux.ie, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org, yanmin_zhang@linux.intel.com,
	bo.he@intel.com
Subject: Re: [PATCH V3] drm_crtc: check if fb_create return NULL
Date: Thu, 24 Jan 2013 11:04:40 +0200	[thread overview]
Message-ID: <878v7juf2v.fsf@intel.com> (raw)
In-Reply-To: <1359017171.18561.29.camel@suxuemin.sh.intel.com>

On Thu, 24 Jan 2013, "Su, Xuemin" <xuemin.su@intel.com> wrote:
> On Thu, 2013-01-24 at 10:31 +0200, Jani Nikula wrote:
>> >  	}
>> > +	/* some buggy driver may return NULL here, which may cause panic */
>> > +	BUG_ON(!fb);
>> 
>> I fail to see the benefit of this compared to just letting it oops...
>> 
>> >  	or->fb_id = fb->base.id;
>> 
>> ...right here.
>> 
>> 
> For PATCH V3, I think a BUG_ON may give the user clearer information
> about the reason of panic. Easier to debug.

Ah, sorry, never mind, I missed Daniel's comment. The benefit of the
BUG_ON() is making it clear what's expected of the drivers.

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

  reply	other threads:[~2013-01-24  9:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-24  0:36 [PATCH V3] drm_crtc: check if fb_create return NULL Su, Xuemin
2013-01-24  8:31 ` Jani Nikula
2013-01-24  8:46   ` Su, Xuemin
2013-01-24  9:04     ` Jani Nikula [this message]
2013-01-31  0:55       ` Su, Xuemin
2013-01-31  8:22         ` Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878v7juf2v.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=airlied@linux.ie \
    --cc=bo.he@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xuemin.su@intel.com \
    --cc=yanmin_zhang@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox