From: Alex Hung Date: Mon, 14 Apr 2025 16:00:59 +0000 (-0600) Subject: drm/amd/display: Remove redundant null check X-Git-Tag: v6.16-rc1~144^2~10^2~65 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=19860f49393dde1997f0487378e4cfee8b14d5c0;p=thirdparty%2Fkernel%2Flinux.git drm/amd/display: Remove redundant null check [WHY & HOW] The null check for connector was dereferenced previously in the same function and the caller. Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Hung Signed-off-by: Ray Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 51255016e5fbb..6525a190bb0ca 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -6989,11 +6989,6 @@ create_stream_for_sink(struct drm_connector *connector, drm_mode_init(&mode, drm_mode); memset(&saved_mode, 0, sizeof(saved_mode)); - if (connector == NULL) { - drm_err(dev, "connector is NULL!\n"); - return stream; - } - if (connector->connector_type != DRM_MODE_CONNECTOR_WRITEBACK) { aconnector = NULL; aconnector = to_amdgpu_dm_connector(connector);