Synchronize the registration and de-registration with the SCSI layer
at CCW registration, de-registration. Before we registered with the
SCSI layer on adapter activation. This way the reg and de-reg process
is in balance.
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
 
        zfcp_fc_nameserver_init(adapter);
 
-       return 0;
+       if (!zfcp_adapter_scsi_register(adapter))
+               return 0;
 
 sysfs_failed:
        zfcp_adapter_debug_unregister(adapter);
 
        if (retval)
                goto out;
 
-       retval = zfcp_adapter_scsi_register(adapter);
-       if (retval)
-               goto out_scsi_register;
-
        /* initialize request counter */
        BUG_ON(!zfcp_reqlist_isempty(adapter));
        adapter->req_no = 0;
        flush_work(&adapter->scan_work);
        return 0;
 
- out_scsi_register:
-       zfcp_erp_thread_kill(adapter);
  out:
        up(&zfcp_data.config_sema);
        return retval;