Skip to contentSkip to conversation

crypto: octeontx2 - fix signedness bug in cptvf_register_interrupts()

PATCH In review Dan Carpenter 2 participants 2 messages Jan 27, 2021 – Feb 5, 2021

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

PATCH 1/1 crypto: octeontx2 - fix signedness bug in cptvf_register_interrupts()

The "num_vec" has to be signed for the error handling to work.

Fixes 19d8e8c7be15 ("crypto: octeontx2 - add virtual function driver support")
---
 drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c +1 -1
index 9663be38ee40..47f378731024 100644
@@ -34,7 +34,7 @@ static void cptvf_disable_pfvf_mbox_intrs(struct otx2_cptvf_dev *cptvf)
 static int cptvf_register_interrupts(struct otx2_cptvf_dev *cptvf)
 {
 	int ret, irq;
-	u32 num_vec;
+	int num_vec;
 
 	num_vec = pci_msix_vec_count(cptvf->pdev);
 	if (num_vec <= 0)
Signature · 1 line
2.29.2
maintainer
#1 lore raw
Quoted 7 lines · Dan Carpenter

The "num_vec" has to be signed for the error handling to work.

Fixes 19d8e8c7be15 ("crypto: octeontx2 - add virtual function driver support")
---
 drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt