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: <CADnq5_NKJ2nC_2akBEX+7EOhgF-XsPjVw_QTHqKDkoA3G6qx1A@mail.gmail.com>
Date:   Fri, 22 Apr 2022 14:23:08 -0400
From:   Alex Deucher <alexdeucher@...il.com>
To:     Haowen Bai <baihaowen@...zu.com>
Cc:     Alex Deucher <alexander.deucher@....com>,
        Christian König <christian.koenig@....com>,
        "Pan, Xinhui" <Xinhui.Pan@....com>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        Maling list - DRI developers 
        <dri-devel@...ts.freedesktop.org>,
        amd-gfx list <amd-gfx@...ts.freedesktop.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm/amdgpu: Remove useless kfree

Applied.  Thanks!

Alex

On Fri, Apr 22, 2022 at 2:04 AM Haowen Bai <baihaowen@...zu.com> wrote:
>
> After alloc fail, we do not need to kfree.
>
> Signed-off-by: Haowen Bai <baihaowen@...zu.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> index ec709997c9c7..5fb3e69c04c4 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> @@ -1849,7 +1849,6 @@ static int amdgpu_ras_realloc_eh_data_space(struct amdgpu_device *adev,
>         void *bps = kmalloc(align_space * sizeof(*data->bps), GFP_KERNEL);
>
>         if (!bps) {
> -               kfree(bps);
>                 return -ENOMEM;
>         }
>
> --
> 2.7.4
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ