drm/gma500: fix error path in gma_intel_setup_gmbus()
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Tue, 9 Feb 2016 20:11:12 +0000 (21:11 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 10 Feb 2016 07:25:42 +0000 (08:25 +0100)
commit52dfa12e45510fce566fb240135420d7a0b5d0e6
tree371e22a7b5e8d65eea7d0cc0cbfa553c886802ef
parent4c61716c2bfaaf1b8837a67775662008b4f42225
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>
drivers/gpu/drm/gma500/intel_gmbus.c