]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
scsi: cxlflash: return -EFAULT if copy_from_user() fails
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 30 Jun 2017 08:01:06 +0000 (11:01 +0300)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 12 Jul 2017 21:06:51 +0000 (17:06 -0400)
commiteeac8cda2c957e156093933b860eec09e488fe15
treeea0ae90c30da15876cbd6c8d1a127e0461b7e758
parentc57ec8fb7c025322f25a077afc94e0ef18cc3d89
scsi: cxlflash: return -EFAULT if copy_from_user() fails

The copy_from/to_user() functions return the number of bytes remaining
to be copied but we had intended to return -EFAULT here.

Fixes: bc88ac47d5cb ("scsi: cxlflash: Support AFU debug")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/cxlflash/main.c