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


Groups > linux.kernel > #1441301 > unrolled thread

Re: [PATCH] drm_aux-dev: fix error handling in drm_dp_aux_dev_init()

Started byDaniel Vetter <daniel@ffwll.ch>
First post2016-07-12 14:20 +0200
Last post2016-07-12 14:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] drm_aux-dev: fix error handling in drm_dp_aux_dev_init() Daniel Vetter <daniel@ffwll.ch> - 2016-07-12 14:20 +0200

#1441301 — Re: [PATCH] drm_aux-dev: fix error handling in drm_dp_aux_dev_init()

FromDaniel Vetter <daniel@ffwll.ch>
Date2016-07-12 14:20 +0200
SubjectRe: [PATCH] drm_aux-dev: fix error handling in drm_dp_aux_dev_init()
Message-ID<rU4Pn-4KV-1@gated-at.bofh.it>
On Thu, Jun 30, 2016 at 12:52:15AM +0300, Alexey Khoroshilov wrote:
> If class_create() fails, there is no need for class_destroy().
> 
> Found by Linux Driver Verification project (linuxtesting.org).
> 
> Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>

Applied to drm-misc, thanks for the patch. Out of curiosity, how exactly
did you spot this bug?
-Daniel

> ---
>  drivers/gpu/drm/drm_dp_aux_dev.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_dp_aux_dev.c b/drivers/gpu/drm/drm_dp_aux_dev.c
> index 3334baacf43d..734f86a345f6 100644
> --- a/drivers/gpu/drm/drm_dp_aux_dev.c
> +++ b/drivers/gpu/drm/drm_dp_aux_dev.c
> @@ -355,8 +355,7 @@ int drm_dp_aux_dev_init(void)
>  
>  	drm_dp_aux_dev_class = class_create(THIS_MODULE, "drm_dp_aux_dev");
>  	if (IS_ERR(drm_dp_aux_dev_class)) {
> -		res = PTR_ERR(drm_dp_aux_dev_class);
> -		goto out;
> +		return PTR_ERR(drm_dp_aux_dev_class);
>  	}
>  	drm_dp_aux_dev_class->dev_groups = drm_dp_aux_groups;
>  
> -- 
> 1.9.1
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web