summaryrefslogtreecommitdiff
path: root/drivers/scsi/mpt3sas/mpt3sas_ctl.c
diff options
context:
space:
mode:
authorSreekanth Reddy <sreekanth.reddy@broadcom.com>2019-09-13 09:04:46 -0400
committerMartin K. Petersen <martin.petersen@oracle.com>2019-09-30 22:32:47 -0400
commit29f571f8b4cc652cae9244630f714a610549d301 (patch)
tree0124c7efeb36de22f230241ebc3d220da55ec635 /drivers/scsi/mpt3sas/mpt3sas_ctl.c
parenta8a6cbcd038de4ee3722c17edd7a4d84ce423f7d (diff)
scsi: mpt3sas: Fail release cmnd if diag buffer is released
Return the diag buffer release command with -EINVAL status if the buffer is already released. Link: https://lore.kernel.org/r/1568379890-18347-10-git-send-email-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/mpt3sas/mpt3sas_ctl.c')
-rw-r--r--drivers/scsi/mpt3sas/mpt3sas_ctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.c b/drivers/scsi/mpt3sas/mpt3sas_ctl.c
index 62e878d6a52b..9267ffecedcd 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_ctl.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_ctl.c
@@ -2235,7 +2235,7 @@ _ctl_diag_release(struct MPT3SAS_ADAPTER *ioc, void __user *arg)
MPT3_DIAG_BUFFER_IS_RELEASED) {
ioc_err(ioc, "%s: buffer_type(0x%02x) is already released\n",
__func__, buffer_type);
- return 0;
+ return -EINVAL;
}
request_data = ioc->diag_buffer[buffer_type];