Skip to content

Commit

Permalink
[WATCHDOG] s3c2410_wdt - initialize watchdog irq resource
Browse files Browse the repository at this point in the history
In the error path of s3c2410wdt_probe() and in s3c2410wdt_remove(),
we're using wdt_irq without initialising it, leading to a oops.

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
  • Loading branch information
Arnaud Patard authored and Wim Van Sebroeck committed May 6, 2007
1 parent 261259b commit 62be074
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/char/watchdog/s3c2410_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,14 +379,14 @@ static int s3c2410wdt_probe(struct platform_device *pdev)

DBG("probe: mapped wdt_base=%p\n", wdt_base);

res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
if (res == NULL) {
wdt_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
if (wdt_irq == NULL) {
printk(KERN_INFO PFX "failed to get irq resource\n");
ret = -ENOENT;
goto err_map;
}

ret = request_irq(res->start, s3c2410wdt_irq, 0, pdev->name, pdev);
ret = request_irq(wdt_irq->start, s3c2410wdt_irq, 0, pdev->name, pdev);
if (ret != 0) {
printk(KERN_INFO PFX "failed to install irq (%d)\n", ret);
goto err_map;
Expand Down

0 comments on commit 62be074

Please sign in to comment.