[PATCH 4.4 215/312] net/mlx4_core: Check device state before unregistering it