diff options
author | Arnaud Patard <arnaud.patard@rtp-net.org> | 2007-05-05 15:53:15 +0200 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2007-05-06 19:36:28 +0000 |
commit | 62be074147fe2e24359d76a33938df7bccea1e6a (patch) | |
tree | 97507febe57bf540df109c906b7d2c1b42eef401 /drivers/char/watchdog/s3c2410_wdt.c | |
parent | 261259b2a8c2924cbe591697e740654734ec0f7b (diff) |
[WATCHDOG] s3c2410_wdt - initialize watchdog irq resource
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>
Diffstat (limited to 'drivers/char/watchdog/s3c2410_wdt.c')
-rw-r--r-- | drivers/char/watchdog/s3c2410_wdt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/char/watchdog/s3c2410_wdt.c b/drivers/char/watchdog/s3c2410_wdt.c index dff6cb5dc9a..20fa29ca740 100644 --- a/drivers/char/watchdog/s3c2410_wdt.c +++ b/drivers/char/watchdog/s3c2410_wdt.c @@ -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; |