dc->clk_mgr is already dereferenced inside dcn401_prepare_bandwidth(),
so the dc->clk_mgr NULL check that follows is redundant and misleading.
Drop it.
Fixes: 080f9655cf2b ("drm/amd/display: Register DCN as a PMFW DF C-state client
on DCN42")
Reported-by: Dan Carpenter <[email protected]>
Cc: Roman Li <[email protected]>
Cc: Alex Hung <[email protected]>
Cc: Tom Chung <[email protected]>
Cc: Ivan Lipski <[email protected]>
Cc: Harry Wentland <[email protected]>
Cc: Aurabindo Pillai <[email protected]>
Cc: Nicholas Kazlauskas <[email protected]>
Cc: Wayne Lin <[email protected]>
Cc: Dan Wheeler <[email protected]>
Cc: Leo Chen <[email protected]>
Signed-off-by: Srinivasan Shanmugam <[email protected]>
---
drivers/gpu/drm/amd/display/dc/hwss/dcn42/dcn42_hwseq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dcn42/dcn42_hwseq.c
b/drivers/gpu/drm/amd/display/dc/hwss/dcn42/dcn42_hwseq.c
index ee40ee8f62ef..49af05d9e7cb 100644
--- a/drivers/gpu/drm/amd/display/dc/hwss/dcn42/dcn42_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn42/dcn42_hwseq.c
@@ -783,7 +783,7 @@ void dcn42_prepare_bandwidth(
/* valid C-state watermarks have now been committed to HW, so it
* is safe to vote "allow" to PMFW.
*/
- if (dc->clk_mgr && dc->clk_mgr->funcs &&
dc->clk_mgr->funcs->notify_cstate_disable)
+ if (dc->clk_mgr->funcs && dc->clk_mgr->funcs->notify_cstate_disable)
dc->clk_mgr->funcs->notify_cstate_disable(dc->clk_mgr, false);
}
--
2.34.1