File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -14099,17 +14099,18 @@ lpfc_init(void)
14099
14099
printk (KERN_ERR "Could not register lpfcmgmt device, "
14100
14100
"misc_register returned with status %d" , error );
14101
14101
14102
+ error = - ENOMEM ;
14102
14103
lpfc_transport_functions .vport_create = lpfc_vport_create ;
14103
14104
lpfc_transport_functions .vport_delete = lpfc_vport_delete ;
14104
14105
lpfc_transport_template =
14105
14106
fc_attach_transport (& lpfc_transport_functions );
14106
14107
if (lpfc_transport_template == NULL )
14107
- return - ENOMEM ;
14108
+ goto unregister ;
14108
14109
lpfc_vport_transport_template =
14109
14110
fc_attach_transport (& lpfc_vport_transport_functions );
14110
14111
if (lpfc_vport_transport_template == NULL ) {
14111
14112
fc_release_transport (lpfc_transport_template );
14112
- return - ENOMEM ;
14113
+ goto unregister ;
14113
14114
}
14114
14115
lpfc_nvme_cmd_template ();
14115
14116
lpfc_nvmet_cmd_template ();
@@ -14135,6 +14136,8 @@ lpfc_init(void)
14135
14136
cpuhp_failure :
14136
14137
fc_release_transport (lpfc_transport_template );
14137
14138
fc_release_transport (lpfc_vport_transport_template );
14139
+ unregister :
14140
+ misc_deregister (& lpfc_mgmt_dev );
14138
14141
14139
14142
return error ;
14140
14143
}
You can’t perform that action at this time.
0 commit comments