[PATCH 5.8 332/633] RDMA/hns: Add a check for current state before modifying QP