mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oliver Neukum <oliver@neukum.org>
To: Pavel Machek <pavel@ucw.cz>
Cc: "Rick L. Vinyard, Jr." <rvinyard@cs.nmsu.edu>,
	Jiri Kosina <jkosina@suse.cz>,
	linux-kernel@vger.kernel.org, felipe.balbi@nokia.com,
	jayakumar.lkml@gmail.com, linux-fbdev@vger.kernel.org,
	krzysztof.h1@wp.pl, akpm@linux-foundation.org,
	linux-usb@vger.kernel.org, linux-input@vger.kernel.org,
	dmitry.torokhov@gmail.com
Subject: Re: [PATCH] hid: Logitech G13 driver 0.0.4
Date: Thu, 28 Jan 2010 08:47:50 +0100	[thread overview]
Message-ID: <201001280847.50445.oliver@neukum.org> (raw)
In-Reply-To: <20100128072425.GA25633@atrey.karlin.mff.cuni.cz>

 Am Donnerstag, 28. Januar 2010 08:24:26 schrieben Sie:
> > Again, like I said, I don't have a problem changing it. If it's wrong,
> > it's wrong no matter how many other drivers may take the same
> > approach.
> 
> I believe it is wrong.

So do I. You need not fail if copy_to_user() fails, but if you go
that route you need to evaluate the return value of copy_to_user()
and return:

not_written = copy_to_user(...);
return to_be_written - not_written ? to_be_written - not_written : -EFAULT;

	Regards
		Oliver

  reply	other threads:[~2010-01-28  7:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-20 20:47 Rick L. Vinyard Jr.
2010-01-20 21:19 ` Oliver Neukum
2010-01-25 16:48   ` Rick L. Vinyard, Jr.
2010-01-25 16:59     ` Jiri Kosina
2010-01-25 18:02       ` Rick L. Vinyard, Jr.
2010-01-28  7:24         ` Pavel Machek
2010-01-28  7:47           ` Oliver Neukum [this message]
2010-01-20 21:27 ` Oliver Neukum
2010-01-25 16:49   ` Rick L. Vinyard, Jr.

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=201001280847.50445.oliver@neukum.org \
    --to=oliver@neukum.org \
    --cc=akpm@linux-foundation.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=felipe.balbi@nokia.com \
    --cc=jayakumar.lkml@gmail.com \
    --cc=jkosina@suse.cz \
    --cc=krzysztof.h1@wp.pl \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=rvinyard@cs.nmsu.edu \
    /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

Powered by JetHome