AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/amdgpu: ensure the connector is not null before using it
@ 2024-08-09  7:34 Tim Huang
  2024-08-09  7:34 ` [PATCH 2/2] drm/amd/pm: ensure the fw_info " Tim Huang
  2024-08-14  8:59 ` [PATCH 1/2] drm/amdgpu: ensure the connector " Zhang, Jesse(Jie)
  0 siblings, 2 replies; 4+ messages in thread
From: Tim Huang @ 2024-08-09  7:34 UTC (permalink / raw)
  To: amd-gfx
  Cc: alexander.deucher, christian.koenig, jesse.zhang, bob.zhou,
	Tim Huang

This resolves the dereference null return value warning
reported by Coverity.

Signed-off-by: Tim Huang <tim.huang@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
index 092ec11258cd..046d4c4e0299 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
@@ -1474,7 +1474,7 @@ bool amdgpu_display_crtc_scaling_mode_fixup(struct drm_crtc *crtc,
 		if ((!(mode->flags & DRM_MODE_FLAG_INTERLACE)) &&
 		    ((amdgpu_encoder->underscan_type == UNDERSCAN_ON) ||
 		     ((amdgpu_encoder->underscan_type == UNDERSCAN_AUTO) &&
-		      connector->display_info.is_hdmi &&
+		      connector && connector->display_info.is_hdmi &&
 		      amdgpu_display_is_hdtv_mode(mode)))) {
 			if (amdgpu_encoder->underscan_hborder != 0)
 				amdgpu_crtc->h_border = amdgpu_encoder->underscan_hborder;
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-08-14  8:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-09  7:34 [PATCH 1/2] drm/amdgpu: ensure the connector is not null before using it Tim Huang
2024-08-09  7:34 ` [PATCH 2/2] drm/amd/pm: ensure the fw_info " Tim Huang
2024-08-14  8:59   ` Zhang, Jesse(Jie)
2024-08-14  8:59 ` [PATCH 1/2] drm/amdgpu: ensure the connector " Zhang, Jesse(Jie)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox