提交 2d2f8d59 编写于 作者: J Jesper Juhl 提交者: James Bottomley

[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: NJesper Juhl <jesper.juhl@gmail.com>
Acked-by: N"Ju, Seokmann" <Seokmann.Ju@lsil.com>
Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
上级 5fcda422
......@@ -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 ) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册