Reviewed-by: Alex Deucher <alexander.deucher@xxxxxxx> On Wed, Jul 26, 2023 at 12:24 PM Srinivasan Shanmugam <srinivasan.shanmugam@xxxxxxx> wrote: > > Fixes the below: > > WARNING: kfree(NULL) is safe and this check is probably not required. > > Cc: Christian König <christian.koenig@xxxxxxx> > Cc: Alex Deucher <alexander.deucher@xxxxxxx> > Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@xxxxxxx> > --- > drivers/gpu/drm/radeon/radeon_connectors.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c > index 4ceceb972e8d..d2f02c3dfce2 100644 > --- a/drivers/gpu/drm/radeon/radeon_connectors.c > +++ b/drivers/gpu/drm/radeon/radeon_connectors.c > @@ -333,10 +333,8 @@ static void radeon_connector_free_edid(struct drm_connector *connector) > { > struct radeon_connector *radeon_connector = to_radeon_connector(connector); > > - if (radeon_connector->edid) { > - kfree(radeon_connector->edid); > - radeon_connector->edid = NULL; > - } > + kfree(radeon_connector->edid); > + radeon_connector->edid = NULL; > } > > static int radeon_ddc_get_modes(struct drm_connector *connector) > -- > 2.25.1 >