[PATCH 3/9] drm/i915/intel_i2c: refactor using intel_gmbus_get_bus
Chris Wilson
chris at chris-wilson.co.uk
Wed Mar 7 04:02:20 PST 2012
On Wed, 7 Mar 2012 19:50:44 +0800, Daniel Kurtz <djkurtz at chromium.org> wrote:
> +struct i2c_adapter *intel_gmbus_get_bus(struct drm_i915_private *dev_priv,
> + int pin)
> +{
BUG_ON(pin >= GMBUS_NUM_PORTS);
> + return (pin < GMBUS_NUM_PORTS) ? &dev_priv->gmbus[pin].adapter : NULL;
You just turned a programming error into a nearly undecipherable OOPS.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the dri-devel
mailing list