Commit 27c7742e7ae089377f984cde608ba02d1c544a97
1 parent
1c067318a2
Exists in
master
and in
7 other branches
[WATCHDOG] Mixcom Watchdog - clean-up printk's
Clean-up printk's. Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Showing 1 changed file with 9 additions and 3 deletions Side-by-side Diff
drivers/char/watchdog/mixcomwd.c
... | ... | @@ -287,13 +287,19 @@ |
287 | 287 | ret = misc_register(&mixcomwd_miscdev); |
288 | 288 | if (ret) |
289 | 289 | { |
290 | - release_region(watchdog_port, 1); | |
291 | - return ret; | |
290 | + printk(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n", | |
291 | + WATCHDOG_MINOR, ret); | |
292 | + goto error_misc_register_watchdog; | |
292 | 293 | } |
293 | 294 | |
294 | 295 | printk(KERN_INFO "MixCOM watchdog driver v%s, watchdog port at 0x%3x\n",VERSION,watchdog_port); |
295 | 296 | |
296 | 297 | return 0; |
298 | + | |
299 | +error_misc_register_watchdog: | |
300 | + release_region(watchdog_port, 1); | |
301 | + watchdog_port = 0x0000; | |
302 | + return ret; | |
297 | 303 | } |
298 | 304 | |
299 | 305 | static void __exit mixcomwd_exit(void) |
300 | 306 | |
... | ... | @@ -306,8 +312,8 @@ |
306 | 312 | mixcomwd_timer_alive=0; |
307 | 313 | } |
308 | 314 | } |
309 | - release_region(watchdog_port,1); | |
310 | 315 | misc_deregister(&mixcomwd_miscdev); |
316 | + release_region(watchdog_port,1); | |
311 | 317 | } |
312 | 318 | |
313 | 319 | module_init(mixcomwd_init); |