[PATCH] drm/i915: add check for valid init_clock_gating-pointer
Chris Wilson
chris at chris-wilson.co.uk
Thu Jun 16 08:47:53 PDT 2011
On Thu, 16 Jun 2011 08:15:57 -0700, Jesse Barnes <jbarnes at virtuousgeek.org> wrote:
> On Thu, 16 Jun 2011 15:28:46 +0200
> Wolfram Sang <w.sang at pengutronix.de> wrote:
> > How about BUG_ON(!ptr) in the init-routine for a bit more grace? And/or
> > a warning in the else-block? It seems to happen to users...
>
> Yeah, a BUG_ON would be fine.
if (WARN_ON(!ptr, "no display vtable"))
return -ENODEV;
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the dri-devel
mailing list