scsi: lpfc: Fix some error codes in debugfs
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 12 Mar 2021 07:42:11 +0000 (10:42 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Mar 2021 08:04:09 +0000 (09:04 +0100)
commiteb9d08b343510b1544fa3a734194594a5960dfdf
tree257730320dbc698c5649d1500ef4e19074d827b3
parente95c0d43509c1118d39ce0094b973f0a57f64d03
scsi: lpfc: Fix some error codes in debugfs

commit 19f1bc7edf0f97186810e13a88f5b62069d89097 upstream.

If copy_from_user() or kstrtoull() fail then the correct behavior is to
return a negative error code.

Link: https://lore.kernel.org/r/YEsbU/UxYypVrC7/@mwanda
Fixes: f9bb2da11db8 ("[SCSI] lpfc 8.3.27: T10 additions for SLI4")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/lpfc/lpfc_debugfs.c