Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 343868
b: refs/heads/master
c: 56411c0
h: refs/heads/master
v: v3
  • Loading branch information
Matthijs Kooijman authored and Mauro Carvalho Chehab committed Oct 28, 2012
1 parent a6712ad commit 68f9aa5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 17 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: 895507c19f88b7bbf82f24737d86cca0398647cb
refs/heads/master: 56411c0f1eec7495bcf1fd6b83a51bb57be608d4
29 changes: 13 additions & 16 deletions trunk/drivers/media/rc/ene_ir.c
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,7 @@ static int ene_probe(struct pnp_dev *pnp_dev, const struct pnp_device_id *id)
dev = kzalloc(sizeof(struct ene_device), GFP_KERNEL);
rdev = rc_allocate_device();
if (!dev || !rdev)
goto error1;
goto failure;

/* validate resources */
error = -ENODEV;
Expand All @@ -1014,10 +1014,10 @@ static int ene_probe(struct pnp_dev *pnp_dev, const struct pnp_device_id *id)

if (!pnp_port_valid(pnp_dev, 0) ||
pnp_port_len(pnp_dev, 0) < ENE_IO_SIZE)
goto error;
goto failure;

if (!pnp_irq_valid(pnp_dev, 0))
goto error;
goto failure;

spin_lock_init(&dev->hw_lock);

Expand All @@ -1033,7 +1033,7 @@ static int ene_probe(struct pnp_dev *pnp_dev, const struct pnp_device_id *id)
/* detect hardware version and features */
error = ene_hw_detect(dev);
if (error)
goto error;
goto failure;

if (!dev->hw_learning_and_tx_capable && txsim) {
dev->hw_learning_and_tx_capable = true;
Expand Down Expand Up @@ -1078,30 +1078,27 @@ static int ene_probe(struct pnp_dev *pnp_dev, const struct pnp_device_id *id)
/* claim the resources */
error = -EBUSY;
if (!request_region(dev->hw_io, ENE_IO_SIZE, ENE_DRIVER_NAME)) {
dev->hw_io = -1;
dev->irq = -1;
goto error;
goto failure;
}

dev->irq = pnp_irq(pnp_dev, 0);
if (request_irq(dev->irq, ene_isr,
IRQF_SHARED, ENE_DRIVER_NAME, (void *)dev)) {
dev->irq = -1;
goto error;
goto failure2;
}

error = rc_register_device(rdev);
if (error < 0)
goto error;
goto failure3;

pr_notice("driver has been successfully loaded\n");
return 0;
error:
if (dev && dev->irq >= 0)
free_irq(dev->irq, dev);
if (dev && dev->hw_io >= 0)
release_region(dev->hw_io, ENE_IO_SIZE);
error1:

failure3:
free_irq(dev->irq, dev);
failure2:
release_region(dev->hw_io, ENE_IO_SIZE);
failure:
rc_free_device(rdev);
kfree(dev);
return error;
Expand Down

0 comments on commit 68f9aa5

Please sign in to comment.