diff options
Diffstat (limited to 'drivers/s390/scsi/zfcp_aux.c')
-rw-r--r-- | drivers/s390/scsi/zfcp_aux.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c index 8af7dfbe022c..497986f6d643 100644 --- a/drivers/s390/scsi/zfcp_aux.c +++ b/drivers/s390/scsi/zfcp_aux.c | |||
@@ -249,8 +249,8 @@ struct zfcp_port *zfcp_get_port_by_wwpn(struct zfcp_adapter *adapter, | |||
249 | struct zfcp_port *port; | 249 | struct zfcp_port *port; |
250 | 250 | ||
251 | list_for_each_entry(port, &adapter->port_list_head, list) | 251 | list_for_each_entry(port, &adapter->port_list_head, list) |
252 | if ((port->wwpn == wwpn) && !(atomic_read(&port->status) & | 252 | if ((port->wwpn == wwpn) && |
253 | (ZFCP_STATUS_PORT_NO_WWPN | ZFCP_STATUS_COMMON_REMOVE))) | 253 | !(atomic_read(&port->status) & ZFCP_STATUS_COMMON_REMOVE)) |
254 | return port; | 254 | return port; |
255 | return NULL; | 255 | return NULL; |
256 | } | 256 | } |
@@ -620,11 +620,10 @@ struct zfcp_port *zfcp_port_enqueue(struct zfcp_adapter *adapter, u64 wwpn, | |||
620 | dev_set_drvdata(&port->sysfs_device, port); | 620 | dev_set_drvdata(&port->sysfs_device, port); |
621 | 621 | ||
622 | read_lock_irq(&zfcp_data.config_lock); | 622 | read_lock_irq(&zfcp_data.config_lock); |
623 | if (!(status & ZFCP_STATUS_PORT_NO_WWPN)) | 623 | if (zfcp_get_port_by_wwpn(adapter, wwpn)) { |
624 | if (zfcp_get_port_by_wwpn(adapter, wwpn)) { | 624 | read_unlock_irq(&zfcp_data.config_lock); |
625 | read_unlock_irq(&zfcp_data.config_lock); | 625 | goto err_out_free; |
626 | goto err_out_free; | 626 | } |
627 | } | ||
628 | read_unlock_irq(&zfcp_data.config_lock); | 627 | read_unlock_irq(&zfcp_data.config_lock); |
629 | 628 | ||
630 | if (device_register(&port->sysfs_device)) | 629 | if (device_register(&port->sysfs_device)) |