lkml.org 
[lkml]   [2019]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH 2/6] drm/amdgpu/dm/mst: Remove unnecessary NULL check
    On Thu, Sep 26, 2019 at 6:52 PM Lyude Paul <lyude@redhat.com> wrote:
    >
    > kfree() checks this automatically.
    >
    > Signed-off-by: Lyude Paul <lyude@redhat.com>

    Reviewed-by: Alex Deucher <alexander.deucher@amd.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@lists.freedesktop.org
    > https://lists.freedesktop.org/mailman/listinfo/amd-gfx

    \
     
     \ /
      Last update: 2019-09-27 16:07    [W:4.875 / U:0.112 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site