lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAOi1vP89H+D_FDoFEjzqC1ff7ryjBhAYEwtH6NC8YhmXWpyQhQ@mail.gmail.com>
Date:   Mon, 14 Jun 2021 19:17:03 +0200
From:   Ilya Dryomov <idryomov@...il.com>
To:     zuoqilin1@....com
Cc:     Jeff Layton <jlayton@...nel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Ceph Development <ceph-devel@...r.kernel.org>,
        netdev <netdev@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        zuoqilin <zuoqilin@...ong.com>
Subject: Re: [PATCH] net/ceph: Remove unnecessary variables

On Thu, Jun 10, 2021 at 12:02 PM <zuoqilin1@....com> wrote:
>
> From: zuoqilin <zuoqilin@...ong.com>
>
> There is no necessary to define variable assignment,
> just return directly to simplify the steps.
>
> Signed-off-by: zuoqilin <zuoqilin@...ong.com>
> ---
>  net/ceph/auth.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/net/ceph/auth.c b/net/ceph/auth.c
> index de407e8..b824a48 100644
> --- a/net/ceph/auth.c
> +++ b/net/ceph/auth.c
> @@ -58,12 +58,10 @@ struct ceph_auth_client *ceph_auth_init(const char *name,
>                                         const int *con_modes)
>  {
>         struct ceph_auth_client *ac;
> -       int ret;
>
> -       ret = -ENOMEM;
>         ac = kzalloc(sizeof(*ac), GFP_NOFS);
>         if (!ac)
> -               goto out;
> +               return ERR_PTR(-ENOMEM);
>
>         mutex_init(&ac->mutex);
>         ac->negotiating = true;
> @@ -78,9 +76,6 @@ struct ceph_auth_client *ceph_auth_init(const char *name,
>         dout("%s name '%s' preferred_mode %d fallback_mode %d\n", __func__,
>              ac->name, ac->preferred_mode, ac->fallback_mode);
>         return ac;
> -
> -out:
> -       return ERR_PTR(ret);
>  }
>
>  void ceph_auth_destroy(struct ceph_auth_client *ac)

Applied.

Thanks,

                Ilya

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ