diff options
-rw-r--r-- | drivers/scsi/fcoe/fcoe.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index 8e217ab7646e..813f26d8b417 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c | |||
@@ -1250,15 +1250,21 @@ static int __init fcoe_if_init(void) | |||
1250 | /* attach to scsi transport */ | 1250 | /* attach to scsi transport */ |
1251 | fcoe_nport_scsi_transport = | 1251 | fcoe_nport_scsi_transport = |
1252 | fc_attach_transport(&fcoe_nport_fc_functions); | 1252 | fc_attach_transport(&fcoe_nport_fc_functions); |
1253 | if (!fcoe_nport_scsi_transport) | ||
1254 | goto err; | ||
1255 | |||
1253 | fcoe_vport_scsi_transport = | 1256 | fcoe_vport_scsi_transport = |
1254 | fc_attach_transport(&fcoe_vport_fc_functions); | 1257 | fc_attach_transport(&fcoe_vport_fc_functions); |
1255 | 1258 | if (!fcoe_vport_scsi_transport) | |
1256 | if (!fcoe_nport_scsi_transport) { | 1259 | goto err_vport; |
1257 | printk(KERN_ERR "fcoe: Failed to attach to the FC transport\n"); | ||
1258 | return -ENODEV; | ||
1259 | } | ||
1260 | 1260 | ||
1261 | return 0; | 1261 | return 0; |
1262 | |||
1263 | err_vport: | ||
1264 | fc_release_transport(fcoe_nport_scsi_transport); | ||
1265 | err: | ||
1266 | printk(KERN_ERR "fcoe: Failed to attach to the FC transport\n"); | ||
1267 | return -ENODEV; | ||
1262 | } | 1268 | } |
1263 | 1269 | ||
1264 | /** | 1270 | /** |