Skip to contentSkip to conversation

updated megaraid gcc 4.1 warning fix

PATCH In review Daniel Walker 2 participants 2 messages May 10, 2006 – May 11, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 updated megaraid gcc 4.1 warning fix

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

drivers/scsi/megaraid.c +3 -2
Index: 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 ) {
#1 lore raw
Quoted 8 lines · Daniel Walker

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

Looks ok to me