summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/radeon
diff options
context:
space:
mode:
authorSrinivasan Shanmugam <srinivasan.shanmugam@amd.com>2023-07-26 19:17:37 +0300
committerAlex Deucher <alexander.deucher@amd.com>2023-07-27 21:59:30 +0300
commitefd9d065de6733c52b24ecb676ddd94446d1fe11 (patch)
tree04adb87ced64ce47b63a6047e9d796a80c959ec0 /drivers/gpu/drm/radeon
parent7db36fe942b8e8a58f66d4f74941f18baaef8800 (diff)
downloadlinux-efd9d065de6733c52b24ecb676ddd94446d1fe11.tar.xz
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>
Diffstat (limited to 'drivers/gpu/drm/radeon')
-rw-r--r--drivers/gpu/drm/radeon/radeon_connectors.c6
1 files 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)