Commit 20b1730a authored by Heiko Carstens's avatar Heiko Carstens Committed by Linus Torvalds

[PATCH] zfcp: bugfix and compile fixes

Bugfix (usage of uninitialized pointer in zfcp_port_dequeue) and compile
fixes for the zfcp device driver.
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: default avatarJames Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 7f84f226
...@@ -1403,15 +1403,14 @@ zfcp_port_enqueue(struct zfcp_adapter *adapter, wwn_t wwpn, u32 status, ...@@ -1403,15 +1403,14 @@ zfcp_port_enqueue(struct zfcp_adapter *adapter, wwn_t wwpn, u32 status,
void void
zfcp_port_dequeue(struct zfcp_port *port) zfcp_port_dequeue(struct zfcp_port *port)
{ {
struct fc_port *rport;
zfcp_port_wait(port); zfcp_port_wait(port);
write_lock_irq(&zfcp_data.config_lock); write_lock_irq(&zfcp_data.config_lock);
list_del(&port->list); list_del(&port->list);
port->adapter->ports--; port->adapter->ports--;
write_unlock_irq(&zfcp_data.config_lock); write_unlock_irq(&zfcp_data.config_lock);
if (port->rport) if (port->rport)
fc_remote_port_delete(rport); fc_remote_port_delete(port->rport);
port->rport = NULL;
zfcp_adapter_put(port->adapter); zfcp_adapter_put(port->adapter);
zfcp_sysfs_port_remove_files(&port->sysfs_device, zfcp_sysfs_port_remove_files(&port->sysfs_device,
atomic_read(&port->status)); atomic_read(&port->status));
......
...@@ -203,7 +203,7 @@ zfcp_ccw_set_offline(struct ccw_device *ccw_device) ...@@ -203,7 +203,7 @@ zfcp_ccw_set_offline(struct ccw_device *ccw_device)
{ {
struct zfcp_adapter *adapter; struct zfcp_adapter *adapter;
struct zfcp_port *port; struct zfcp_port *port;
struct fc_port *rport; struct fc_rport *rport;
down(&zfcp_data.config_sema); down(&zfcp_data.config_sema);
adapter = dev_get_drvdata(&ccw_device->dev); adapter = dev_get_drvdata(&ccw_device->dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment