Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 285248
b: refs/heads/master
c: c8e57e1
h: refs/heads/master
v: v3
  • Loading branch information
Ben Hutchings authored and Mauro Carvalho Chehab committed Nov 24, 2011
1 parent ddeca82 commit 9151542
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 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: 9105b8b200410383d0854bbe237ee385d7d33ba6
refs/heads/master: c8e57e1b766c2321aa76ee5e6878c69bd2313d62
19 changes: 16 additions & 3 deletions trunk/drivers/staging/media/lirc/lirc_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -875,11 +875,14 @@ static int __devinit lirc_serial_probe(struct platform_device *dev)
": or compile the serial port driver as module and\n");
printk(KERN_WARNING LIRC_DRIVER_NAME
": make sure this module is loaded first\n");
return -EBUSY;
result = -EBUSY;
goto exit_free_irq;
}

if (hardware_init_port() < 0)
return -EINVAL;
if (hardware_init_port() < 0) {
result = -EINVAL;
goto exit_release_region;
}

/* Initialize pulse/space widths */
init_timing_params(duty_cycle, freq);
Expand Down Expand Up @@ -911,6 +914,16 @@ static int __devinit lirc_serial_probe(struct platform_device *dev)

dprintk("Interrupt %d, port %04x obtained\n", irq, io);
return 0;

exit_release_region:
if (iommap != 0)
release_mem_region(iommap, 8 << ioshift);
else
release_region(io, 8);
exit_free_irq:
free_irq(irq, (void *)&hardware);

return result;
}

static int __devexit lirc_serial_remove(struct platform_device *dev)
Expand Down

0 comments on commit 9151542

Please sign in to comment.