Commit d2473081 authored by Wim Van Sebroeck's avatar Wim Van Sebroeck

[WATCHDOG] sbc60xxwdt.c patch6

some small clean-ups: do correct errorhandling
parent 72b25871
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
* made timeout (the emulated heartbeat) a module_param * made timeout (the emulated heartbeat) a module_param
* made the keepalive ping an internal subroutine * made the keepalive ping an internal subroutine
* made wdt_stop and wdt_start module params * made wdt_stop and wdt_start module params
* added extra printk's for startup problems
* added MODULE_AUTHOR and MODULE_DESCRIPTION info * added MODULE_AUTHOR and MODULE_DESCRIPTION info
* *
* *
...@@ -239,7 +240,7 @@ static int fop_ioctl(struct inode *inode, struct file *file, unsigned int cmd, ...@@ -239,7 +240,7 @@ static int fop_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
switch(cmd) switch(cmd)
{ {
default: default:
return -ENOTTY; return -ENOIOCTLCMD;
case WDIOC_GETSUPPORT: case WDIOC_GETSUPPORT:
return copy_to_user((struct watchdog_info *)arg, &ident, sizeof(ident))?-EFAULT:0; return copy_to_user((struct watchdog_info *)arg, &ident, sizeof(ident))?-EFAULT:0;
case WDIOC_GETSTATUS: case WDIOC_GETSTATUS:
...@@ -364,6 +365,7 @@ static int __init sbc60xxwdt_init(void) ...@@ -364,6 +365,7 @@ static int __init sbc60xxwdt_init(void)
{ {
printk(KERN_ERR PFX "I/O address 0x%04x already in use\n", printk(KERN_ERR PFX "I/O address 0x%04x already in use\n",
wdt_stop); wdt_stop);
rc = -EIO;
goto err_out_region1; goto err_out_region1;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment