Skip to content

Commit e4e9ba5

Browse files
sswenJames Bottomley
authored andcommitted
[SCSI] zfcp: prevent fc_remote_port_delete calls for unregistered rport
In case of an adapter reopen all rports have to be deleted from the environment. This should only happen for already registered rports otherwise fc_remote_port_delete is called with a NULL pointer. Signed-off-by: Swen Schillig <[email protected]> Signed-off-by: Christof Schmitt <[email protected]> Signed-off-by: James Bottomley <[email protected]>
1 parent b7f15f3 commit e4e9ba5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/s390/scsi/zfcp_erp.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,6 +1236,8 @@ static void zfcp_erp_rports_del(struct zfcp_adapter *adapter)
12361236
{
12371237
struct zfcp_port *port;
12381238
list_for_each_entry(port, &adapter->port_list_head, list) {
1239+
if (!port->rport)
1240+
continue;
12391241
fc_remote_port_delete(port->rport);
12401242
port->rport = NULL;
12411243
}

0 commit comments

Comments
 (0)