Return ENOTTY instead of ENOIOCTLCMD in user-visible ioctl() results
The watchdog drivers used to return ENOIOCTLCMD for bad ioctl() commands.
ENOIOCTLCMD should not be visible by the user, so use ENOTTY instead.
Signed-off-by: Samuel Tardieu <[email protected]>
Signed-off-by: Wim Van Sebroeck <[email protected]>
Acked-by: Alan Cox <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
}
default:
- return -ENOIOCTLCMD;
+ return -ENOTTY;
}
}
pnx4008_wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
unsigned long arg)
{
- int ret = -ENOIOCTLCMD;
+ int ret = -ENOTTY;
int time;
switch (cmd) {