[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231119195401.GH186930@vergenet.net>
Date: Sun, 19 Nov 2023 19:54:01 +0000
From: Simon Horman <horms@...nel.org>
To: Srujana Challa <schalla@...vell.com>
Cc: herbert@...dor.apana.org.au, davem@...emloft.net,
linux-crypto@...r.kernel.org, netdev@...r.kernel.org,
linux-doc@...r.kernel.org, bbrezillon@...nel.org, arno@...isbad.org,
kuba@...nel.org, ndabilpuram@...vell.com, sgoutham@...vell.com
Subject: Re: [PATCH v1 09/10] crypto/octeontx2: register error interrupts for
inline cptlf
On Fri, Nov 03, 2023 at 11:03:05AM +0530, Srujana Challa wrote:
> From: Nithin Dabilpuram <ndabilpuram@...vell.com>
>
> Register errors interrupts for inline cptlf attached to PF driver
> so that SMMU faults and other errors can be reported.
>
> Signed-off-by: Nithin Dabilpuram <ndabilpuram@...vell.com>
...
> diff --git a/drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c b/drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c
...
> @@ -760,8 +760,11 @@ static int otx2_cptpf_probe(struct pci_dev *pdev,
> if (err)
> goto clear_drvdata;
>
> - err = pci_alloc_irq_vectors(pdev, RVU_PF_INT_VEC_CNT,
> - RVU_PF_INT_VEC_CNT, PCI_IRQ_MSIX);
> + num_vec = pci_msix_vec_count(cptpf->pdev);
> + if (num_vec <= 0)
> + goto clear_drvdata;
Hi Srujana and Nithin,
This branch will result in the function returning err.
However, err is set to 0 here. Perhaps it should
be set to a negative error value instead.
As flagged by Smatch.
> +
> + err = pci_alloc_irq_vectors(pdev, num_vec, num_vec, PCI_IRQ_MSIX);
> if (err < 0) {
> dev_err(dev, "Request for %d msix vectors failed\n",
> RVU_PF_INT_VEC_CNT);
...
Powered by blists - more mailing lists