diff mbox series

scsi: mpt3sas: Signedness bug in _base_get_diag_triggers()

Message ID X9DZH37bYPHwSQRP@mwanda
State New
Headers show
Series scsi: mpt3sas: Signedness bug in _base_get_diag_triggers() | expand

Commit Message

Dan Carpenter Dec. 9, 2020, 2:03 p.m. UTC
The "trigger_flags" variable needs to be signed for the error checking
to work.

Fixes: 5767aaffbb8b ("scsi: mpt3sas: Add persistent trigger pages support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/scsi/mpt3sas/mpt3sas_base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index 969baf4cd3f5..6e23dc3209fe 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -5034,7 +5034,7 @@  _base_check_for_trigger_pages_support(struct MPT3SAS_ADAPTER *ioc)
 static void
 _base_get_diag_triggers(struct MPT3SAS_ADAPTER *ioc)
 {
-	u16 trigger_flags;
+	int trigger_flags;
 
 	/*
 	 * Default setting of master trigger.