aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/watchdog/cpu5wdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/watchdog/cpu5wdt.c')
-rw-r--r--drivers/char/watchdog/cpu5wdt.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/char/watchdog/cpu5wdt.c b/drivers/char/watchdog/cpu5wdt.c
index bcd7e36ca0aa..d0d45a8b09f0 100644
--- a/drivers/char/watchdog/cpu5wdt.c
+++ b/drivers/char/watchdog/cpu5wdt.c
@@ -220,17 +220,17 @@ static int __devinit cpu5wdt_init(void)
220 if ( verbose ) 220 if ( verbose )
221 printk(KERN_DEBUG PFX "port=0x%x, verbose=%i\n", port, verbose); 221 printk(KERN_DEBUG PFX "port=0x%x, verbose=%i\n", port, verbose);
222 222
223 if ( (err = misc_register(&cpu5wdt_misc)) < 0 ) {
224 printk(KERN_ERR PFX "misc_register failed\n");
225 goto no_misc;
226 }
227
228 if ( !request_region(port, CPU5WDT_EXTENT, PFX) ) { 223 if ( !request_region(port, CPU5WDT_EXTENT, PFX) ) {
229 printk(KERN_ERR PFX "request_region failed\n"); 224 printk(KERN_ERR PFX "request_region failed\n");
230 err = -EBUSY; 225 err = -EBUSY;
231 goto no_port; 226 goto no_port;
232 } 227 }
233 228
229 if ( (err = misc_register(&cpu5wdt_misc)) < 0 ) {
230 printk(KERN_ERR PFX "misc_register failed\n");
231 goto no_misc;
232 }
233
234 /* watchdog reboot? */ 234 /* watchdog reboot? */
235 val = inb(port + CPU5WDT_STATUS_REG); 235 val = inb(port + CPU5WDT_STATUS_REG);
236 val = (val >> 2) & 1; 236 val = (val >> 2) & 1;
@@ -250,9 +250,9 @@ static int __devinit cpu5wdt_init(void)
250 250
251 return 0; 251 return 0;
252 252
253no_port:
254 misc_deregister(&cpu5wdt_misc);
255no_misc: 253no_misc:
254 release_region(port, CPU5WDT_EXTENT);
255no_port:
256 return err; 256 return err;
257} 257}
258 258