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]
Date:   Tue, 7 Aug 2018 17:02:04 +0200
From:   Ilya Dryomov <idryomov@...il.com>
To:     yuehaibing@...wei.com
Cc:     "David S. Miller" <davem@...emloft.net>,
        "Yan, Zheng" <zyan@...hat.com>, Sage Weil <sage@...hat.com>,
        linux-kernel@...r.kernel.org, netdev <netdev@...r.kernel.org>,
        Ceph Development <ceph-devel@...r.kernel.org>
Subject: Re: [PATCH net-next] ceph: remove unnecessary non NULL check for request_key

On Tue, Aug 7, 2018 at 3:03 PM YueHaibing <yuehaibing@...wei.com> wrote:
>
> request_key never return NULL,so no need do non-NULL check.
>
> Signed-off-by: YueHaibing <yuehaibing@...wei.com>
> ---
>  net/ceph/ceph_common.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/ceph/ceph_common.c b/net/ceph/ceph_common.c
> index 584fdbe..9834edc 100644
> --- a/net/ceph/ceph_common.c
> +++ b/net/ceph/ceph_common.c
> @@ -304,7 +304,7 @@ static int get_secret(struct ceph_crypto_key *dst, const char *name) {
>         struct ceph_crypto_key *ckey;
>
>         ukey = request_key(&key_type_ceph, name, NULL);
> -       if (!ukey || IS_ERR(ukey)) {
> +       if (IS_ERR(ukey)) {
>                 /* request_key errors don't map nicely to mount(2)
>                    errors; don't even try, but still printk */
>                 key_err = PTR_ERR(ukey);

Applied.

Thanks,

                Ilya

Powered by blists - more mailing lists