Skip to content

Commit

Permalink
drm/i915: fix error path in intel_setup_gmbus()
Browse files Browse the repository at this point in the history
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: f899fc6 ("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]
  • Loading branch information
Villemoes authored and jnikula committed Feb 10, 2016
1 parent 3e99a6b commit 2417c8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/intel_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 2417c8c

Please sign in to comment.