[PATCH] drm/i915: gracefully bail out when init_clock_gating-pointer is not set
Chris Wilson
chris at chris-wilson.co.uk
Mon Jun 20 09:43:22 PDT 2011
On Mon, 20 Jun 2011 18:10:30 +0200, Wolfram Sang <w.sang at pengutronix.de> wrote:
> Commit 6067aa (drm/i915: split clock gating init into per-chipset
> functions) introduces an init_clock_gating-pointer. There is one case,
> however, where it does not get set, so that caused an OOPS (Bug 37252).
> Change the code to return -ENODEV in this case and propagate it to the
> upper layers.
That's better, the system will continue to boot now and we will have an
appropriate error message.
> - } else
> - dev_priv->display.update_wm = NULL;
> + } else {
> + dev_err(dev->dev, "Unknown type!\n");
DRM_ERROR("Unknown chipset: %lx\n", dev->pci_device);
> + return -ENODEV;
> + }
DRM_ERROR to be in keeping with the rest of the code, and a bit of context
in case the error is ever pasted into bugzilla.kernel.org.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the dri-devel
mailing list