diff options
Diffstat (limited to 'drivers/scsi/fnic/fnic_main.c')
-rw-r--r-- | drivers/scsi/fnic/fnic_main.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/scsi/fnic/fnic_main.c b/drivers/scsi/fnic/fnic_main.c index fc61f17025ce..018cc427504a 100644 --- a/drivers/scsi/fnic/fnic_main.c +++ b/drivers/scsi/fnic/fnic_main.c | |||
@@ -424,15 +424,13 @@ static int __devinit fnic_probe(struct pci_dev *pdev, | |||
424 | * Allocate SCSI Host and set up association between host, | 424 | * Allocate SCSI Host and set up association between host, |
425 | * local port, and fnic | 425 | * local port, and fnic |
426 | */ | 426 | */ |
427 | host = scsi_host_alloc(&fnic_host_template, | 427 | lp = libfc_host_alloc(&fnic_host_template, sizeof(struct fnic)); |
428 | sizeof(struct fc_lport) + sizeof(struct fnic)); | 428 | if (!lp) { |
429 | if (!host) { | 429 | printk(KERN_ERR PFX "Unable to alloc libfc local port\n"); |
430 | printk(KERN_ERR PFX "Unable to alloc SCSI host\n"); | ||
431 | err = -ENOMEM; | 430 | err = -ENOMEM; |
432 | goto err_out; | 431 | goto err_out; |
433 | } | 432 | } |
434 | lp = shost_priv(host); | 433 | host = lp->host; |
435 | lp->host = host; | ||
436 | fnic = lport_priv(lp); | 434 | fnic = lport_priv(lp); |
437 | fnic->lport = lp; | 435 | fnic->lport = lp; |
438 | 436 | ||