Skip to content

Commit

Permalink
gigaset: return -ENOTTY for unimplemented functions
Browse files Browse the repository at this point in the history
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: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Paul Bolle authored and David S. Miller committed Mar 10, 2009
1 parent 3c420f2 commit 3f61213
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/isdn/gigaset/usb-gigaset.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
unsigned new_state)
{
return -EINVAL;
return -ENOTTY;
}

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)
{
return -EINVAL;
return -ENOTTY;
}
#endif

Expand Down Expand Up @@ -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,
0, 0, &buf, 6, 2000);
#else
return -EINVAL;
return -ENOTTY;
#endif
}

Expand Down

0 comments on commit 3f61213

Please sign in to comment.