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>
This commit is contained in:
Srinivasan Shanmugam
2023-07-26 21:47:37 +05:30
committed by Alex Deucher
parent 7db36fe942
commit efd9d065de
+2 -4
View File
@@ -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)