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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANjDDBgMS099WdT14wK_Lqkc++z1i6A1gtgFhpOT+2mdUQHAfw@mail.gmail.com>
Date:   Wed, 8 Mar 2017 20:33:44 +0530
From:   Devesh Sharma <devesh.sharma@...adcom.com>
To:     SF Markus Elfring <elfring@...rs.sourceforge.net>
Cc:     linux-rdma <linux-rdma@...r.kernel.org>,
        Devesh Sharma <devesh.sharma@...gotech.com>,
        Doug Ledford <dledford@...hat.com>,
        Hal Rosenstock <hal.rosenstock@...il.com>,
        Sean Hefty <sean.hefty@...el.com>,
        Selvin Xavier <selvin.xavier@...gotech.com>,
        LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 16/26] IB/ocrdma: Adjust a null pointer check in ocrdma_alloc_resources()

Acked-By: Devesh Sharma <devesh.sharma@...adcom.com>

On Wed, Mar 8, 2017 at 6:45 PM, SF Markus Elfring
<elfring@...rs.sourceforge.net> wrote:
> From: Markus Elfring <elfring@...rs.sourceforge.net>
> Date: Tue, 7 Mar 2017 22:34:33 +0100
>
> The script "checkpatch.pl" pointed information out like the following.
>
> Comparison to NULL could be written "!dev->stag_arr".
>
> Thus fix the affected source code place.
>
> Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
> ---
>  drivers/infiniband/hw/ocrdma/ocrdma_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_main.c b/drivers/infiniband/hw/ocrdma/ocrdma_main.c
> index 93113feeb2d5..fbf672c79d5f 100644
> --- a/drivers/infiniband/hw/ocrdma/ocrdma_main.c
> +++ b/drivers/infiniband/hw/ocrdma/ocrdma_main.c
> @@ -238,7 +238,7 @@ static int ocrdma_alloc_resources(struct ocrdma_dev *dev)
>
>         dev->stag_arr = kcalloc(OCRDMA_MAX_STAG, sizeof(*dev->stag_arr),
>                                 GFP_KERNEL);
> -       if (dev->stag_arr == NULL)
> +       if (!dev->stag_arr)
>                 goto alloc_err;
>
>         ocrdma_alloc_pd_pool(dev);
> --
> 2.12.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ