aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/megaraid.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/megaraid.c')
-rw-r--r--drivers/scsi/megaraid.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c
index ccb0055..b87bef6 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 ) {