Message ID | 20120725125118.28998.33019.stgit@localhost.localdomain (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, Jul 25, 2012 at 01:51:20PM +0100, Alan Cox wrote: > From: Alan Cox <alan@linux.intel.com> > > drv_priv->gmbus is an array. Comparing it with NULL is somewhat less useful > than a chocolate teapot. > > Possibly we should be testing bus != NULL each iteration of the loop > instead ? > > gcc could help by warning too! > > Signed-off-by: Alan Cox <alan@linux.intel.com> All three patches merged for -fixes, thanks. -Daniel
diff --git a/drivers/gpu/drm/i915/intel_i2c.c b/drivers/gpu/drm/i915/intel_i2c.c index 1991a44..d79500b 100644 --- a/drivers/gpu/drm/i915/intel_i2c.c +++ b/drivers/gpu/drm/i915/intel_i2c.c @@ -540,9 +540,6 @@ void intel_teardown_gmbus(struct drm_device *dev) struct drm_i915_private *dev_priv = dev->dev_private; int i; - if (dev_priv->gmbus == NULL) - return; - for (i = 0; i < GMBUS_NUM_PORTS; i++) { struct intel_gmbus *bus = &dev_priv->gmbus[i]; i2c_del_adapter(&bus->adapter);