From: Dan Carpenter Date: Wed, 27 Jan 2021 05:25:59 +0000 (+0300) Subject: crypto: octeontx2 - fix signedness bug in cptvf_register_interrupts() X-Git-Tag: v5.12-rc1~124^2~41 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b33fa5ff8190befed1eb0ac4783e15adfa7f7135;p=thirdparty%2Fkernel%2Flinux.git 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") Signed-off-by: Dan Carpenter Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c b/drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c index 9663be38ee404..47f3787310243 100644 --- a/drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c +++ b/drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c @@ -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)