Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 325482
b: refs/heads/master
c: 4c229df
h: refs/heads/master
v: v3
  • Loading branch information
Alexey Khoroshilov authored and Greg Kroah-Hartman committed Sep 25, 2012
1 parent a58c17a commit ecba686
Show file tree
Hide file tree
Showing 2 changed files with 12 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: 62fea8c8f1bf5ca33ba55b3f421d9598a68297ee
refs/heads/master: 4c229df0b19cda41a8ea93f26497374004299fda
15 changes: 11 additions & 4 deletions trunk/drivers/staging/sbe-2t3e3/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ static int __devinit t3e3_init_channel(struct channel *channel, struct pci_dev *
dev = alloc_hdlcdev(channel);
if (!dev) {
printk(KERN_ERR "SBE 2T3E3" ": Out of memory\n");
err = -ENOMEM;
goto free_regions;
}

Expand All @@ -82,8 +83,9 @@ static int __devinit t3e3_init_channel(struct channel *channel, struct pci_dev *
else
channel->h.slot = 0;

if (setup_device(dev, channel))
goto free_regions;
err = setup_device(dev, channel);
if (err)
goto free_dev;

pci_read_config_dword(channel->pdev, 0x40, &val); /* mask sleep mode */
pci_write_config_dword(channel->pdev, 0x40, val & 0x3FFFFFFF);
Expand All @@ -92,14 +94,19 @@ static int __devinit t3e3_init_channel(struct channel *channel, struct pci_dev *
pci_read_config_dword(channel->pdev, PCI_COMMAND, &channel->h.command);
t3e3_init(channel);

if (request_irq(dev->irq, &t3e3_intr, IRQF_SHARED, dev->name, dev)) {
err = request_irq(dev->irq, &t3e3_intr, IRQF_SHARED, dev->name, dev);
if (err) {
printk(KERN_WARNING "%s: could not get irq: %d\n", dev->name, dev->irq);
goto free_regions;
goto unregister_dev;
}

pci_set_drvdata(pdev, channel);
return 0;

unregister_dev:
unregister_hdlc_device(dev);
free_dev:
free_netdev(dev);
free_regions:
pci_release_regions(pdev);
disable:
Expand Down

0 comments on commit ecba686

Please sign in to comment.