mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Su, Xuemin" <xuemin.su@intel.com>
To: Jani Nikula <jani.nikula@linux.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 16:46:11 +0800	[thread overview]
Message-ID: <1359017171.18561.29.camel@suxuemin.sh.intel.com> (raw)
In-Reply-To: <87bocfugln.fsf@intel.com>

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.
I submitted a PATCH V2 yesterday which gives a warning and then return
-EVAL if fb==NULL, preventing the panic. Do you think this is
acceptable?


  reply	other threads:[~2013-01-24  8:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-24  0:36 Su, Xuemin
2013-01-24  8:31 ` Jani Nikula
2013-01-24  8:46   ` Su, Xuemin [this message]
2013-01-24  9:04     ` Jani Nikula
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=1359017171.18561.29.camel@suxuemin.sh.intel.com \
    --to=xuemin.su@intel.com \
    --cc=airlied@linux.ie \
    --cc=bo.he@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®