[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADnq5_MR_WZHOMa0JQWpm9fZgpsCWFpmO1B5Rph_OVhje6kokg@mail.gmail.com>
Date: Fri, 27 Sep 2019 10:05:54 -0400
From: Alex Deucher <alexdeucher@...il.com>
To: Lyude Paul <lyude@...hat.com>
Cc: amd-gfx list <amd-gfx@...ts.freedesktop.org>,
"David (ChunMing) Zhou" <David1.Zhou@....com>,
Thomas Lim <Thomas.Lim@....com>, Leo Li <sunpeng.li@....com>,
David Francis <David.Francis@....com>,
LKML <linux-kernel@...r.kernel.org>,
Maling list - DRI developers
<dri-devel@...ts.freedesktop.org>,
Nicholas Kazlauskas <nicholas.kazlauskas@....com>,
David Airlie <airlied@...ux.ie>,
"Jerry (Fangzhi) Zuo" <Jerry.Zuo@....com>,
Daniel Vetter <daniel@...ll.ch>,
Alex Deucher <alexander.deucher@....com>,
Harry Wentland <harry.wentland@....com>,
Christian König <christian.koenig@....com>
Subject: Re: [PATCH 2/6] drm/amdgpu/dm/mst: Remove unnecessary NULL check
On Thu, Sep 26, 2019 at 6:52 PM Lyude Paul <lyude@...hat.com> wrote:
>
> kfree() checks this automatically.
>
> Signed-off-by: Lyude Paul <lyude@...hat.com>
Reviewed-by: Alex Deucher <alexander.deucher@....com>
And applied. Thanks!
Alex
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
> index 185bf0e2bda2..a398ddd1f306 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
> @@ -144,10 +144,8 @@ dm_dp_mst_connector_destroy(struct drm_connector *connector)
> struct amdgpu_dm_connector *amdgpu_dm_connector = to_amdgpu_dm_connector(connector);
> struct amdgpu_encoder *amdgpu_encoder = amdgpu_dm_connector->mst_encoder;
>
> - if (amdgpu_dm_connector->edid) {
> - kfree(amdgpu_dm_connector->edid);
> - amdgpu_dm_connector->edid = NULL;
> - }
> + kfree(amdgpu_dm_connector->edid);
> + amdgpu_dm_connector->edid = NULL;
>
> drm_encoder_cleanup(&amdgpu_encoder->base);
> kfree(amdgpu_encoder);
> --
> 2.21.0
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@...ts.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Powered by blists - more mailing lists