Skip to content

Commit efd9d06

Browse files
srishanmalexdeucher
authored andcommitted
drm/radeon: Remove unnecessary NULL test before kfree in 'radeon_connector_free_edid'
Fixes the below: WARNING: kfree(NULL) is safe and this check is probably not required. Cc: Christian König <christian.koenig@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 7db36fe commit efd9d06

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

drivers/gpu/drm/radeon/radeon_connectors.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -333,10 +333,8 @@ static void radeon_connector_free_edid(struct drm_connector *connector)
333333
{
334334
struct radeon_connector *radeon_connector = to_radeon_connector(connector);
335335

336-
if (radeon_connector->edid) {
337-
kfree(radeon_connector->edid);
338-
radeon_connector->edid = NULL;
339-
}
336+
kfree(radeon_connector->edid);
337+
radeon_connector->edid = NULL;
340338
}
341339

342340
static int radeon_ddc_get_modes(struct drm_connector *connector)

0 commit comments

Comments
 (0)