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 <linux@rasmusvillemoes.dk>
Fixes: f899fc6 ("drm/i915: use GMBUS to manage i2c links")
Cc: stable@vger.kernel.org
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1455048677-19882-3-git-send-email-linux@rasmusvillemoes.dk
(cherry picked from commit 2417c8c)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
  • Loading branch information
Rasmus Villemoes authored and Jani Nikula committed Feb 10, 2016
1 parent 3974884 commit ed3f9fd
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 ed3f9fd

Please sign in to comment.