aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/ipx/af_ipx.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/net/ipx/af_ipx.c b/net/ipx/af_ipx.c
index 76c661566dfd..89f283c51dff 100644
--- a/net/ipx/af_ipx.c
+++ b/net/ipx/af_ipx.c
@@ -2035,19 +2035,27 @@ static void __exit ipx_proto_finito(void)
2035 2035
2036 ipxitf_cleanup(); 2036 ipxitf_cleanup();
2037 2037
2038 unregister_snap_client(pSNAP_datalink); 2038 if (pSNAP_datalink) {
2039 pSNAP_datalink = NULL; 2039 unregister_snap_client(pSNAP_datalink);
2040 pSNAP_datalink = NULL;
2041 }
2040 2042
2041 unregister_8022_client(p8022_datalink); 2043 if (p8022_datalink) {
2042 p8022_datalink = NULL; 2044 unregister_8022_client(p8022_datalink);
2045 p8022_datalink = NULL;
2046 }
2043 2047
2044 dev_remove_pack(&ipx_8023_packet_type); 2048 dev_remove_pack(&ipx_8023_packet_type);
2045 destroy_8023_client(p8023_datalink); 2049 if (p8023_datalink) {
2046 p8023_datalink = NULL; 2050 destroy_8023_client(p8023_datalink);
2051 p8023_datalink = NULL;
2052 }
2047 2053
2048 dev_remove_pack(&ipx_dix_packet_type); 2054 dev_remove_pack(&ipx_dix_packet_type);
2049 destroy_EII_client(pEII_datalink); 2055 if (pEII_datalink) {
2050 pEII_datalink = NULL; 2056 destroy_EII_client(pEII_datalink);
2057 pEII_datalink = NULL;
2058 }
2051 2059
2052 proto_unregister(&ipx_proto); 2060 proto_unregister(&ipx_proto);
2053 sock_unregister(ipx_family_ops.family); 2061 sock_unregister(ipx_family_ops.family);