linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mikhail Zaytsev <flashed@mail.ru>
To: Johan Hovold <johan@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [v2,1/2] USB: serial: ark3116: Remove unused TIOCSSERIAL ioctl case.
Date: Sat, 6 Jan 2018 20:14:02 +0300	[thread overview]
Message-ID: <20180106201402.03d2ac88@debian> (raw)

The patch removes unused TIOCSSERIAL ioctl case and adds the default block
to the switch. This will make the ioctl return -ENOTTY to user space (e.g.
setserial), because TIOCSSERIAL really isn't supported for these devices
currently.

Signed-off-by: Mikhail Zaytsev <flashed@mail.ru>
---
 drivers/usb/serial/ark3116.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/serial/ark3116.c b/drivers/usb/serial/ark3116.c
index 23d46ef87..2e957c76f 100644
--- a/drivers/usb/serial/ark3116.c
+++ b/drivers/usb/serial/ark3116.c
@@ -418,10 +418,8 @@ static int ark3116_ioctl(struct tty_struct *tty,
 			return -EFAULT;
 
 		return 0;
-	case TIOCSSERIAL:
-		if (copy_from_user(&serstruct, user_arg, sizeof(serstruct)))
-			return -EFAULT;
-		return 0;
+	default:
+		break;
 	}
 
 	return -ENOIOCTLCMD;

             reply	other threads:[~2018-01-06 17:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-06 17:14 Mikhail Zaytsev [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-01-08 10:33 [v2,1/2] USB: serial: ark3116: Remove unused TIOCSSERIAL ioctl case Oliver Neukum
2018-01-08 15:28 Johan Hovold
2018-01-08 21:45 Mikhail Zaytsev
2018-01-09 11:55 Johan Hovold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180106201402.03d2ac88@debian \
    --to=flashed@mail.ru \
    --cc=gregkh@linuxfoundation.org \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).