mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Lyude Paul <lyude@redhat.com>
To: cgel.zte@gmail.com, bskeggs@redhat.com
Cc: kherbst@redhat.com, dri-devel@lists.freedesktop.org,
	nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Minghao Chi <chi.minghao@zte.com.cn>,
	Zeal Robot <zealci@zte.com.cn>
Subject: Re: [PATCH] drm/nouveau: simplify the return expression of nouveau_debugfs_init()
Date: Fri, 29 Apr 2022 15:38:31 -0400	[thread overview]
Message-ID: <baf0a304698c7136c95c3fbb13c90529a51b9e06.camel@redhat.com> (raw)
In-Reply-To: <20220429090309.3853003-1-chi.minghao@zte.com.cn>

Reviewed-by: Lyude Paul <lyude@redhat.com>

Will push to drm-misc-next in a bit

(Kind of impressed that a bot managed to catch this, considering the route
from here to the code capable of returning < 0 or 0 was definitely not
obvious)

On Fri, 2022-04-29 at 09:03 +0000, cgel.zte@gmail.com wrote:
> From: Minghao Chi <chi.minghao@zte.com.cn>
> 
> Simplify the return expression.
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
> ---
>  drivers/gpu/drm/nouveau/nouveau_debugfs.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/nouveau/nouveau_debugfs.c
> b/drivers/gpu/drm/nouveau/nouveau_debugfs.c
> index 1cbe01048b93..76b621f99916 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_debugfs.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.c
> @@ -255,19 +255,13 @@ nouveau_drm_debugfs_init(struct drm_minor *minor)
>  int
>  nouveau_debugfs_init(struct nouveau_drm *drm)
>  {
> -       int ret;
> -
>         drm->debugfs = kzalloc(sizeof(*drm->debugfs), GFP_KERNEL);
>         if (!drm->debugfs)
>                 return -ENOMEM;
>  
> -       ret = nvif_object_ctor(&drm->client.device.object, "debugfsCtrl", 0,
> +       return nvif_object_ctor(&drm->client.device.object, "debugfsCtrl",
> 0,
>                                NVIF_CLASS_CONTROL, NULL, 0,
>                                &drm->debugfs->ctrl);
> -       if (ret)
> -               return ret;
> -
> -       return 0;
>  }
>  
>  void

-- 
Cheers,
 Lyude Paul (she/her)
 Software Engineer at Red Hat


      reply	other threads:[~2022-04-29 19:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-29  9:03 cgel.zte
2022-04-29 19:38 ` Lyude Paul [this message]

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=baf0a304698c7136c95c3fbb13c90529a51b9e06.camel@redhat.com \
    --to=lyude@redhat.com \
    --cc=bskeggs@redhat.com \
    --cc=cgel.zte@gmail.com \
    --cc=chi.minghao@zte.com.cn \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kherbst@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nouveau@lists.freedesktop.org \
    --cc=zealci@zte.com.cn \
    /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®