linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Walker <dwalker@mvista.com>
To: akpm@osdl.org
Cc: Seokmann.Ju@lsil.com, alan@lxorguk.ukuu.org.uk,
	linux-kernel@vger.kernel.org
Subject: [PATCH -mm] updated megaraid gcc 4.1 warning fix
Date: Wed, 10 May 2006 10:26:52 -0700	[thread overview]
Message-ID: <200605101726.k4AHQqZf004367@dwalker1.mvista.com> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 883 bytes --]

Hows that Alan?

Fixes the following warning,

drivers/scsi/megaraid.c: In function ‘megadev_ioctl’:
drivers/scsi/megaraid.c:3665: warning: ignoring return value of ‘copy_to_user’, declared with attribute warn_unused_result

Signed-Off-By: Daniel Walker <dwalker@mvista.com>

Index: linux-2.6.16/drivers/scsi/megaraid.c
===================================================================
--- linux-2.6.16.orig/drivers/scsi/megaraid.c
+++ linux-2.6.16/drivers/scsi/megaraid.c
@@ -3662,8 +3662,9 @@ megadev_ioctl(struct inode *inode, struc
 			 * Send the request sense data also, irrespective of
 			 * whether the user has asked for it or not.
 			 */
-			copy_to_user(upthru->reqsensearea,
-					pthru->reqsensearea, 14);
+			if (copy_to_user(upthru->reqsensearea,
+					pthru->reqsensearea, 14))
+				rval = (-EFAULT);
 
 freemem_and_return:
 			if( pthru->dataxferlen ) {

             reply	other threads:[~2006-05-10 17:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-10 17:26 Daniel Walker [this message]
2006-05-11 13:12 ` [PATCH -mm] updated megaraid gcc 4.1 warning fix Alan Cox
2006-05-11 13:17 Ju, Seokmann

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=200605101726.k4AHQqZf004367@dwalker1.mvista.com \
    --to=dwalker@mvista.com \
    --cc=Seokmann.Ju@lsil.com \
    --cc=akpm@osdl.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@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).