[PATCH 5.1 057/371] net: hns3: add a check to pointer in error_detected and slot_reset