diff options
author | Robert Love <robert.w.love@intel.com> | 2009-02-27 18:56:06 (GMT) |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-03-10 14:06:17 (GMT) |
commit | 03ec862dff57ca3d1fcb439b99aadc45bc5c2f28 (patch) | |
tree | da35accd2d35568a041d0efa77deb306a206c962 /drivers/scsi/fcoe/fcoe_sw.c | |
parent | a468f328ad83f14556e5961ef1de80b32b428d32 (diff) | |
download | linux-fsl-qoriq-03ec862dff57ca3d1fcb439b99aadc45bc5c2f28.tar.xz |
[SCSI] fcoe: Correct fcoe_transports initialization vs. registration
The registration function shouldn't initialize the mutex or
list head. The fcoe SW transport should initialize itself
before registering.
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/fcoe/fcoe_sw.c')
-rw-r--r-- | drivers/scsi/fcoe/fcoe_sw.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/scsi/fcoe/fcoe_sw.c b/drivers/scsi/fcoe/fcoe_sw.c index f667dce..37d359d 100644 --- a/drivers/scsi/fcoe/fcoe_sw.c +++ b/drivers/scsi/fcoe/fcoe_sw.c @@ -467,10 +467,15 @@ int __init fcoe_sw_init(void) /* attach to scsi transport */ scsi_transport_fcoe_sw = fc_attach_transport(&fcoe_sw_transport_function); + if (!scsi_transport_fcoe_sw) { printk(KERN_ERR "fcoe_sw_init:fc_attach_transport() failed\n"); return -ENODEV; } + + mutex_init(&fcoe_sw_transport.devlock); + INIT_LIST_HEAD(&fcoe_sw_transport.devlist); + /* register sw transport */ fcoe_transport_register(&fcoe_sw_transport); return 0; |