* [PATCH AUTOSEL 6.6 55/58] drm/amd/display: Check null pointer before dereferencing se
[not found] <20241004182503.3672477-1-sashal@kernel.org>
@ 2024-10-04 18:24 ` Sasha Levin
0 siblings, 0 replies; only message in thread
From: Sasha Levin @ 2024-10-04 18:24 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Alex Hung, Rodrigo Siqueira, Daniel Wheeler, Alex Deucher,
Sasha Levin, harry.wentland, sunpeng.li, Rodrigo.Siqueira,
christian.koenig, Xinhui.Pan, airlied, daniel, alvin.lee2,
chiahsuan.chung, wenjing.liu, sungjoon.kim, dillon.varone,
aurabindo.pillai, chiawen.huang, amd-gfx, dri-devel
From: Alex Hung <alex.hung@amd.com>
[ Upstream commit ff599ef6970ee000fa5bc38d02fa5ff5f3fc7575 ]
[WHAT & HOW]
se is null checked previously in the same function, indicating
it might be null; therefore, it must be checked when used again.
This fixes 1 FORWARD_NULL issue reported by Coverity.
Acked-by: Alex Hung <alex.hung@amd.com>
Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index 50e643bfdfbad..cefa1756e1223 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -1691,7 +1691,7 @@ bool dc_validate_boot_timing(const struct dc *dc,
if (crtc_timing->pix_clk_100hz != pix_clk_100hz)
return false;
- if (!se->funcs->dp_get_pixel_format)
+ if (!se || !se->funcs->dp_get_pixel_format)
return false;
if (!se->funcs->dp_get_pixel_format(
--
2.43.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-10-04 18:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20241004182503.3672477-1-sashal@kernel.org>
2024-10-04 18:24 ` [PATCH AUTOSEL 6.6 55/58] drm/amd/display: Check null pointer before dereferencing se Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox