Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1330928
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/5] drm/gma500: fix error path in gma_intel_setup_gmbus() |
| Date | 2016-02-10 07:50 +0100 |
| Message-ID | <r0wL8-76e-7@gated-at.bofh.it> (permalink) |
| References | <r0mVr-wW-3@gated-at.bofh.it> <r0mVt-wW-29@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Feb 9, 2016 at 10:11 PM, Rasmus Villemoes
<linux@rasmusvillemoes.dk> wrote:
> 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,...
>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
> ---
> drivers/gpu/drm/gma500/intel_gmbus.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/gma500/intel_gmbus.c b/drivers/gpu/drm/gma500/intel_gmbus.c
> index 566d330aaeea..e7e22187c539 100644
> --- a/drivers/gpu/drm/gma500/intel_gmbus.c
> +++ b/drivers/gpu/drm/gma500/intel_gmbus.c
> @@ -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);
> }
> --
> 2.1.4
>
--
With Best Regards,
Andy Shevchenko
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/5] pre-decrement in error paths considered harmful Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2016-02-09 21:20 +0100
[PATCH 5/5] mm/backing-dev.c: fix error path in wb_init() Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2016-02-09 21:20 +0100
[PATCH 4/5] net: sxgbe: fix error paths in sxgbe_platform_probe() Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2016-02-09 21:20 +0100
[PATCH 1/5] drm/gma500: fix error path in gma_intel_setup_gmbus() Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2016-02-09 21:20 +0100
Re: [PATCH 1/5] drm/gma500: fix error path in gma_intel_setup_gmbus() Andy Shevchenko <andy.shevchenko@gmail.com> - 2016-02-10 07:50 +0100
Re: [PATCH 1/5] drm/gma500: fix error path in gma_intel_setup_gmbus() Daniel Vetter <daniel@ffwll.ch> - 2016-02-10 08:30 +0100
[PATCH 3/5] net/mlx4: fix some error handling in mlx4_multi_func_init() Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2016-02-09 21:20 +0100
Re: [PATCH 3/5] net/mlx4: fix some error handling in mlx4_multi_func_init() Yishai Hadas <yishaih@dev.mellanox.co.il> - 2016-02-10 10:50 +0100
Re: [PATCH 3/5] net/mlx4: fix some error handling in mlx4_multi_func_init() Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2016-02-10 19:20 +0100
Re: [PATCH 3/5] net/mlx4: fix some error handling in mlx4_multi_func_init() Jack Morgenstein <jackm@dev.mellanox.co.il> - 2016-02-11 10:30 +0100
Re: [PATCH 3/5] net/mlx4: fix some error handling in mlx4_multi_func_init() Jack Morgenstein <jackm@dev.mellanox.co.il> - 2016-02-11 11:30 +0100
Re: [PATCH 3/5] net/mlx4: fix some error handling in mlx4_multi_func_init() Doug Ledford <dledford@redhat.com> - 2016-02-11 17:10 +0100
csiph-web