Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 102119
b: refs/heads/master
c: ce30e40
h: refs/heads/master
i:
  102117: c66f29c
  102115: 1318206
  102111: 48cac27
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Jul 16, 2008
1 parent e7994c4 commit 1a9b226
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cb8ea0929c9cb899d61c4e155aace0b34d8cffe3
refs/heads/master: ce30e4015954e281f682aa8d158a47885d8e1262
13 changes: 9 additions & 4 deletions trunk/drivers/ide/pci/sgiioc4.c
Original file line number Diff line number Diff line change
Expand Up @@ -588,10 +588,6 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev)
hw_regs_t hw;
struct ide_port_info d = sgiioc4_port_info;

hwif = ide_find_port_slot(&d);
if (hwif == NULL)
return -ENOMEM;

/* Get the CmdBlk and CtrlBlk Base Registers */
bar0 = pci_resource_start(dev, 0);
virt_base = ioremap(bar0, pci_resource_len(dev, 0));
Expand Down Expand Up @@ -621,6 +617,11 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev)
hw.irq = dev->irq;
hw.chipset = ide_pci;
hw.dev = &dev->dev;

hwif = ide_find_port_slot(&d);
if (hwif == NULL)
goto err;

ide_init_port_hw(hwif, &hw);

/* The IOC4 uses MMIO rather than Port IO. */
Expand All @@ -637,6 +638,10 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev)
return -EIO;

return 0;
err:
release_mem_region(cmd_phys_base, IOC4_CMD_CTL_BLK_SIZE);
iounmap(virt_base);
return -ENOMEM;
}

static unsigned int __devinit
Expand Down

0 comments on commit 1a9b226

Please sign in to comment.