amdgpu: fix NULL pointer dereference at tonga_check_states_equal