Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1692234 > unrolled thread

[PATCH] drm/i915/selftests: Fix an error handling path in 'mock_gem_device()'

Started byChristophe JAILLET <christophe.jaillet@wanadoo.fr>
First post2017-07-20 00:40 +0200
Last post2017-07-20 13:00 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] drm/i915/selftests: Fix an error handling path in 'mock_gem_device()' Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2017-07-20 00:40 +0200
    Re: [Intel-gfx] [PATCH] drm/i915/selftests: Fix an error handling  path in 'mock_gem_device()' Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> - 2017-07-20 12:20 +0200
      Re: [Intel-gfx] [PATCH] drm/i915/selftests: Fix an error handling path in  'mock_gem_device()' Chris Wilson <chris@chris-wilson.co.uk> - 2017-07-20 13:00 +0200

#1692234 — [PATCH] drm/i915/selftests: Fix an error handling path in 'mock_gem_device()'

FromChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Date2017-07-20 00:40 +0200
Subject[PATCH] drm/i915/selftests: Fix an error handling path in 'mock_gem_device()'
Message-ID<u55No-6BP-5@gated-at.bofh.it>
Goto the right label in case of error, otherwise there is a leak.
This has been introduced by c5cf9a9147ff. In this patch a goto has not been
updated.

Fixes: c5cf9a9147ff ("drm/i915: Create a kmem_cache to allocate struct i915_priolist from")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/gpu/drm/i915/selftests/mock_gem_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/selftests/mock_gem_device.c b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
index 627e2aa09766..8cdec455cf7d 100644
--- a/drivers/gpu/drm/i915/selftests/mock_gem_device.c
+++ b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
@@ -206,7 +206,7 @@ struct drm_i915_private *mock_gem_device(void)
 	mkwrite_device_info(i915)->ring_mask = BIT(0);
 	i915->engine[RCS] = mock_engine(i915, "mock");
 	if (!i915->engine[RCS])
-		goto err_dependencies;
+		goto err_priorities;
 
 	i915->kernel_context = mock_context(i915, NULL);
 	if (!i915->kernel_context)
-- 
2.11.0

[toc] | [next] | [standalone]


#1692735 — Re: [Intel-gfx] [PATCH] drm/i915/selftests: Fix an error handling path in 'mock_gem_device()'

FromTvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Date2017-07-20 12:20 +0200
SubjectRe: [Intel-gfx] [PATCH] drm/i915/selftests: Fix an error handling path in 'mock_gem_device()'
Message-ID<u5gIO-5VF-33@gated-at.bofh.it>
In reply to#1692234
On 19/07/2017 23:35, Christophe JAILLET wrote:
> Goto the right label in case of error, otherwise there is a leak.
> This has been introduced by c5cf9a9147ff. In this patch a goto has not been
> updated.
> 
> Fixes: c5cf9a9147ff ("drm/i915: Create a kmem_cache to allocate struct i915_priolist from")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
>   drivers/gpu/drm/i915/selftests/mock_gem_device.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/selftests/mock_gem_device.c b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
> index 627e2aa09766..8cdec455cf7d 100644
> --- a/drivers/gpu/drm/i915/selftests/mock_gem_device.c
> +++ b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
> @@ -206,7 +206,7 @@ struct drm_i915_private *mock_gem_device(void)
>   	mkwrite_device_info(i915)->ring_mask = BIT(0);
>   	i915->engine[RCS] = mock_engine(i915, "mock");
>   	if (!i915->engine[RCS])
> -		goto err_dependencies;
> +		goto err_priorities;
>   
>   	i915->kernel_context = mock_context(i915, NULL);
>   	if (!i915->kernel_context)

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

Tvrtko

[toc] | [prev] | [next] | [standalone]


#1692791 — Re: [Intel-gfx] [PATCH] drm/i915/selftests: Fix an error handling path in 'mock_gem_device()'

FromChris Wilson <chris@chris-wilson.co.uk>
Date2017-07-20 13:00 +0200
SubjectRe: [Intel-gfx] [PATCH] drm/i915/selftests: Fix an error handling path in 'mock_gem_device()'
Message-ID<u5hlw-6cX-13@gated-at.bofh.it>
In reply to#1692735
Quoting Tvrtko Ursulin (2017-07-20 11:09:53)
> 
> On 19/07/2017 23:35, Christophe JAILLET wrote:
> > Goto the right label in case of error, otherwise there is a leak.
> > This has been introduced by c5cf9a9147ff. In this patch a goto has not been
> > updated.
> > 
> > Fixes: c5cf9a9147ff ("drm/i915: Create a kmem_cache to allocate struct i915_priolist from")
> > Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> > ---
> >   drivers/gpu/drm/i915/selftests/mock_gem_device.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/selftests/mock_gem_device.c b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
> > index 627e2aa09766..8cdec455cf7d 100644
> > --- a/drivers/gpu/drm/i915/selftests/mock_gem_device.c
> > +++ b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
> > @@ -206,7 +206,7 @@ struct drm_i915_private *mock_gem_device(void)
> >       mkwrite_device_info(i915)->ring_mask = BIT(0);
> >       i915->engine[RCS] = mock_engine(i915, "mock");
> >       if (!i915->engine[RCS])
> > -             goto err_dependencies;
> > +             goto err_priorities;
> >   
> >       i915->kernel_context = mock_context(i915, NULL);
> >       if (!i915->kernel_context)
> 
> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Thanks for the fix and review, pushed.
-Chris

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web