From: Jesper Juhl Date: Fri, 15 Sep 2006 12:43:11 +0000 (+0200) Subject: [SCSI] megaraid: Make megaraid_ioctl() check copy_to_user() return value X-Git-Tag: v2.6.19-rc1~1266^2~19^2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d2f8d59b14bec6c745e219a350ac51d9e00673f;p=linux-2.6 [SCSI] megaraid: Make megaraid_ioctl() check copy_to_user() return value Check copy_to_user() return value in drivers/scsi/megaraid.c::megadev_ioctl() This gets rid of this little warning: drivers/scsi/megaraid.c:3661: warning: ignoring return value of 'copy_to_user', declared with attribute warn_unused_result Signed-off-by: Jesper Juhl Acked-by: "Ju, Seokmann" Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c index ccb0055ac7..b87bef69ba 100644 --- a/drivers/scsi/megaraid.c +++ b/drivers/scsi/megaraid.c @@ -3656,8 +3656,9 @@ megadev_ioctl(struct inode *inode, struct file *filep, unsigned int cmd, * 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 ) {