Commit 3f612132 authored by Paul Bolle's avatar Paul Bolle Committed by David S. Miller

gigaset: return -ENOTTY for unimplemented functions

A number of functions in the usb_gigaset module will return -EINVAL if
CONFIG_GIGASET_UNDOCREQ is not set. Make these return -ENOTTY as it's
more specific and it might make it easier to see (from userspace) why
these functions actually fail.

Impact: some error return codes changed
Signed-off-by: default avatarPaul Bolle <pebolle@tiscali.nl>
Signed-off-by: default avatarTilman Schmidt <tilman@imap.cc>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3c420f27
...@@ -278,17 +278,17 @@ static int gigaset_set_line_ctrl(struct cardstate *cs, unsigned cflag) ...@@ -278,17 +278,17 @@ static int gigaset_set_line_ctrl(struct cardstate *cs, unsigned cflag)
static int gigaset_set_modem_ctrl(struct cardstate *cs, unsigned old_state, static int gigaset_set_modem_ctrl(struct cardstate *cs, unsigned old_state,
unsigned new_state) unsigned new_state)
{ {
return -EINVAL; return -ENOTTY;
} }
static int gigaset_set_line_ctrl(struct cardstate *cs, unsigned cflag) static int gigaset_set_line_ctrl(struct cardstate *cs, unsigned cflag)
{ {
return -EINVAL; return -ENOTTY;
} }
static int gigaset_baud_rate(struct cardstate *cs, unsigned cflag) static int gigaset_baud_rate(struct cardstate *cs, unsigned cflag)
{ {
return -EINVAL; return -ENOTTY;
} }
#endif #endif
...@@ -577,7 +577,7 @@ static int gigaset_brkchars(struct cardstate *cs, const unsigned char buf[6]) ...@@ -577,7 +577,7 @@ static int gigaset_brkchars(struct cardstate *cs, const unsigned char buf[6])
return usb_control_msg(udev, usb_sndctrlpipe(udev, 0), 0x19, 0x41, return usb_control_msg(udev, usb_sndctrlpipe(udev, 0), 0x19, 0x41,
0, 0, &buf, 6, 2000); 0, 0, &buf, 6, 2000);
#else #else
return -EINVAL; return -ENOTTY;
#endif #endif
} }
......
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