Skip to contentSkip to conversation

megaraid gcc 4.1 warning fix

PATCH In review [email protected] 1 participant 1 message Jun 9, 2006

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

PATCH 21/31 megaraid gcc 4.1 warning fix

From: Daniel Walker <[email protected]>

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 |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/scsi/megaraid.c renamed from drivers/scsi/megaraid.c~megaraid-gcc-41-warning-fix +3 -2
diff -puN drivers/scsi/megaraid.c~megaraid-gcc-41-warning-fix 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 ) {

_
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html