Skip to content

Commit e56e9ad

Browse files
Alvin Leealexdeucher
authored andcommitted
drm/amd/display: Fix check for null function ptr
[Why] Bug fix for null function ptr (should check for NULL instead of not NULL) [How] Fix if condition Tested-by: Daniel Wheeler <[email protected]> Reviewed-by: Samson Tam <[email protected]> Acked-by: Rodrigo Siqueira <[email protected]> Signed-off-by: Alvin Lee <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent cdbc583 commit e56e9ad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,7 @@ bool dmub_srv_should_detect(struct dmub_srv *dmub)
852852

853853
enum dmub_status dmub_srv_clear_inbox0_ack(struct dmub_srv *dmub)
854854
{
855-
if (!dmub->hw_init || dmub->hw_funcs.clear_inbox0_ack_register)
855+
if (!dmub->hw_init || !dmub->hw_funcs.clear_inbox0_ack_register)
856856
return DMUB_STATUS_INVALID;
857857

858858
dmub->hw_funcs.clear_inbox0_ack_register(dmub);
@@ -878,7 +878,7 @@ enum dmub_status dmub_srv_wait_for_inbox0_ack(struct dmub_srv *dmub, uint32_t ti
878878
enum dmub_status dmub_srv_send_inbox0_cmd(struct dmub_srv *dmub,
879879
union dmub_inbox0_data_register data)
880880
{
881-
if (!dmub->hw_init || dmub->hw_funcs.send_inbox0_cmd)
881+
if (!dmub->hw_init || !dmub->hw_funcs.send_inbox0_cmd)
882882
return DMUB_STATUS_INVALID;
883883

884884
dmub->hw_funcs.send_inbox0_cmd(dmub, data);

0 commit comments

Comments
 (0)