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 <[email protected]> Cc: Alex Deucher <[email protected]> Signed-off-by: Srinivasan Shanmugam <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 7db36fe commit efd9d06

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

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)