]> Pileus Git - ~andy/linux/commitdiff
[SCSI] zfcp: prevent fc_remote_port_delete calls for unregistered rport
authorSwen Schillig <swen@vnet.ibm.com>
Wed, 1 Oct 2008 10:42:23 +0000 (12:42 +0200)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Fri, 3 Oct 2008 17:11:55 +0000 (12:11 -0500)
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 <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/s390/scsi/zfcp_erp.c

index f5ebeb7ca2be5baa72f8b5f58c69a017fb89b9d6..8c117416d5adba6d541bac976ca9e40a7a275f29 100644 (file)
@@ -1236,6 +1236,8 @@ static void zfcp_erp_rports_del(struct zfcp_adapter *adapter)
 {
        struct zfcp_port *port;
        list_for_each_entry(port, &adapter->port_list_head, list) {
+               if (!port->rport)
+                       continue;
                fc_remote_port_delete(port->rport);
                port->rport = NULL;
        }