Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 74969
b: refs/heads/master
c: 8d431db
h: refs/heads/master
i:
  74967: 944fadb
v: v3
  • Loading branch information
David Brownell authored and Linus Torvalds committed Dec 18, 2007
1 parent 6bd3adb commit ed75256
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 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: fe4304baf26e9580ada52e4579b1b7273434d8dd
refs/heads/master: 8d431dbef4e63d54f1965c3ed6ca5f91ee4512de
20 changes: 10 additions & 10 deletions trunk/drivers/rtc/rtc-at32ap700x.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,18 +225,12 @@ static int __init at32_rtc_probe(struct platform_device *pdev)
goto out;
}

ret = request_irq(irq, at32_rtc_interrupt, IRQF_SHARED, "rtc", rtc);
if (ret) {
dev_dbg(&pdev->dev, "could not request irq %d\n", irq);
goto out;
}

rtc->irq = irq;
rtc->regs = ioremap(regs->start, regs->end - regs->start + 1);
if (!rtc->regs) {
ret = -ENOMEM;
dev_dbg(&pdev->dev, "could not map I/O memory\n");
goto out_free_irq;
goto out;
}
spin_lock_init(&rtc->lock);

Expand All @@ -253,12 +247,18 @@ static int __init at32_rtc_probe(struct platform_device *pdev)
| RTC_BIT(CTRL_EN));
}

ret = request_irq(irq, at32_rtc_interrupt, IRQF_SHARED, "rtc", rtc);
if (ret) {
dev_dbg(&pdev->dev, "could not request irq %d\n", irq);
goto out_iounmap;
}

rtc->rtc = rtc_device_register(pdev->name, &pdev->dev,
&at32_rtc_ops, THIS_MODULE);
if (IS_ERR(rtc->rtc)) {
dev_dbg(&pdev->dev, "could not register rtc device\n");
ret = PTR_ERR(rtc->rtc);
goto out_iounmap;
goto out_free_irq;
}

platform_set_drvdata(pdev, rtc);
Expand All @@ -268,10 +268,10 @@ static int __init at32_rtc_probe(struct platform_device *pdev)

return 0;

out_iounmap:
iounmap(rtc->regs);
out_free_irq:
free_irq(irq, rtc);
out_iounmap:
iounmap(rtc->regs);
out:
kfree(rtc);
return ret;
Expand Down

0 comments on commit ed75256

Please sign in to comment.