mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Alexey Khoroshilov <khoroshilov@ispras.ru>
Cc: David Airlie <airlied@linux.ie>,
	ldv-project@linuxtesting.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm_aux-dev: fix error handling in drm_dp_aux_dev_init()
Date: Tue, 12 Jul 2016 14:11:23 +0200	[thread overview]
Message-ID: <20160712121123.GO23520@phenom.ffwll.local> (raw)
In-Reply-To: <1467237135-13075-1-git-send-email-khoroshilov@ispras.ru>

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

  reply	other threads:[~2016-07-12 12:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-29 21:52 Alexey Khoroshilov
2016-07-12 12:11 ` Daniel Vetter [this message]
2016-09-23 10:26   ` Alexey Khoroshilov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160712121123.GO23520@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=khoroshilov@ispras.ru \
    --cc=ldv-project@linuxtesting.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®