Re: [PATCH 3/9] drm/i915/intel_i2c: refactor using intel_gmbus_get_bus

From: Chris Wilson
Date: Wed Mar 07 2012 - 07:02:27 EST


On Wed, 7 Mar 2012 19:50:44 +0800, Daniel Kurtz <djkurtz@xxxxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/