aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRasmus Villemoes <[email protected]>2016-02-09 21:11:13 +0100
committerJani Nikula <[email protected]>2016-02-10 10:53:29 +0200
commit2417c8c03f508841b85bf61acc91836b7b0e2560 (patch)
treef82e45689ab3edbd95e81b20be300dd397fb9efd
parent3e99a6b9561402909fdb3b0028764d42557e0103 (diff)
drm/i915: fix error path in intel_setup_gmbus()
This fails to undo the setup for pin==0; moreover, something interesting happens if the setup failed already at pin==0. Signed-off-by: Rasmus Villemoes <[email protected]> Fixes: f899fc64cda8 ("drm/i915: use GMBUS to manage i2c links") Cc: [email protected] Signed-off-by: Jani Nikula <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r--drivers/gpu/drm/i915/intel_i2c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_i2c.c b/drivers/gpu/drm/i915/intel_i2c.c
index 25254b5c1ac5..deb8282c26d8 100644
--- a/drivers/gpu/drm/i915/intel_i2c.c
+++ b/drivers/gpu/drm/i915/intel_i2c.c
@@ -683,7 +683,7 @@ int intel_setup_gmbus(struct drm_device *dev)
return 0;
err:
- while (--pin) {
+ while (pin--) {
if (!intel_gmbus_is_valid_pin(dev_priv, pin))
continue;