[Why]
Bug fix for null function ptr (should check for NULL instead of not
NULL)
[How]
Fix if condition
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Reviewed-by: Samson Tam <samson.tam@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alvin Lee <Alvin.Lee2@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
enum dmub_status dmub_srv_clear_inbox0_ack(struct dmub_srv *dmub)
{
- if (!dmub->hw_init || dmub->hw_funcs.clear_inbox0_ack_register)
+ if (!dmub->hw_init || !dmub->hw_funcs.clear_inbox0_ack_register)
return DMUB_STATUS_INVALID;
dmub->hw_funcs.clear_inbox0_ack_register(dmub);
enum dmub_status dmub_srv_send_inbox0_cmd(struct dmub_srv *dmub,
union dmub_inbox0_data_register data)
{
- if (!dmub->hw_init || dmub->hw_funcs.send_inbox0_cmd)
+ if (!dmub->hw_init || !dmub->hw_funcs.send_inbox0_cmd)
return DMUB_STATUS_INVALID;
dmub->hw_funcs.send_inbox0_cmd(dmub, data);