mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 19:29:37 +00:00
drm/gma500: fix error path in gma_intel_setup_gmbus()
The current code fails to call i2c_del_adapter on dev_prev->gmbus[0].adapter, and if the for loop above failed already at i==0, all hell breaks loose when we do the loop body for i = -1,-2,... Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Link: http://patchwork.freedesktop.org/patch/msgid/1455048677-19882-2-git-send-email-linux@rasmusvillemoes.dk Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
4c61716c2b
commit
52dfa12e45
1 changed files with 1 additions and 1 deletions
|
@ -436,7 +436,7 @@ int gma_intel_setup_gmbus(struct drm_device *dev)
|
|||
return 0;
|
||||
|
||||
err:
|
||||
while (--i) {
|
||||
while (i--) {
|
||||
struct intel_gmbus *bus = &dev_priv->gmbus[i];
|
||||
i2c_del_adapter(&bus->adapter);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue