[PATCH 5.2 061/413] net: hns3: add a check to pointer in error_detected and slot_reset