PCI: iproc: Fix return value of iproc_msi_irq_domain_alloc()
diff mbox series

Message ID 20210303142202.25780-1-pali@kernel.org
State In Next
Commit 1e83130f01b04c16579ed5a5e03d729bcffc4c5d
Headers show
Series
  • PCI: iproc: Fix return value of iproc_msi_irq_domain_alloc()
Related show

Commit Message

Pali Rohár March 3, 2021, 2:22 p.m. UTC
IRQ domain alloc function should return zero on success. Non-zero value
indicates failure.

Signed-off-by: Pali Rohár <pali@kernel.org>
Fixes: fc54bae28818 ("PCI: iproc: Allow allocation of multiple MSIs")
---
 drivers/pci/controller/pcie-iproc-msi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Marc Zyngier March 3, 2021, 3:07 p.m. UTC | #1
On Wed, 03 Mar 2021 14:22:02 +0000,
Pali Rohár <pali@kernel.org> wrote:
> 
> IRQ domain alloc function should return zero on success. Non-zero value
> indicates failure.
> 
> Signed-off-by: Pali Rohár <pali@kernel.org>
> Fixes: fc54bae28818 ("PCI: iproc: Allow allocation of multiple MSIs")
> ---
>  drivers/pci/controller/pcie-iproc-msi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/controller/pcie-iproc-msi.c b/drivers/pci/controller/pcie-iproc-msi.c
> index 908475d27e0e..eede4e8f3f75 100644
> --- a/drivers/pci/controller/pcie-iproc-msi.c
> +++ b/drivers/pci/controller/pcie-iproc-msi.c
> @@ -271,7 +271,7 @@ static int iproc_msi_irq_domain_alloc(struct irq_domain *domain,
>  				    NULL, NULL);
>  	}
>  
> -	return hwirq;
> +	return 0;
>  }
>  
>  static void iproc_msi_irq_domain_free(struct irq_domain *domain,

Acked-by: Marc Zyngier <maz@kernel.org>

	M.
Ray Jui March 3, 2021, 5:25 p.m. UTC | #2
On 3/3/2021 6:22 AM, Pali Rohár wrote:
> IRQ domain alloc function should return zero on success. Non-zero value
> indicates failure.
> 
> Signed-off-by: Pali Rohár <pali@kernel.org>
> Fixes: fc54bae28818 ("PCI: iproc: Allow allocation of multiple MSIs")
> ---
>  drivers/pci/controller/pcie-iproc-msi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/controller/pcie-iproc-msi.c b/drivers/pci/controller/pcie-iproc-msi.c
> index 908475d27e0e..eede4e8f3f75 100644
> --- a/drivers/pci/controller/pcie-iproc-msi.c
> +++ b/drivers/pci/controller/pcie-iproc-msi.c
> @@ -271,7 +271,7 @@ static int iproc_msi_irq_domain_alloc(struct irq_domain *domain,
>  				    NULL, NULL);
>  	}
>  
> -	return hwirq;
> +	return 0;
>  }
>  
>  static void iproc_msi_irq_domain_free(struct irq_domain *domain,
> 

Looks good to me. Thanks for the fix.

Acked-by: Ray Jui <ray.jui@broadcom.com>
Krzysztof Wilczyński March 6, 2021, 11:59 p.m. UTC | #3
Hi Pali,

> IRQ domain alloc function should return zero on success. Non-zero value
> indicates failure.
> 
> Signed-off-by: Pali Rohár <pali@kernel.org>
> Fixes: fc54bae28818 ("PCI: iproc: Allow allocation of multiple MSIs")
[...]

Nice catch!

Reviewed-by: Krzysztof Wilczyński <kw@linux.com>

Krzysztof
Lorenzo Pieralisi March 22, 2021, 2:19 p.m. UTC | #4
On Wed, 3 Mar 2021 15:22:02 +0100, Pali Rohár wrote:
> IRQ domain alloc function should return zero on success. Non-zero value
> indicates failure.

Applied to pci/iproc, thanks!

[1/1] PCI: iproc: Fix return value of iproc_msi_irq_domain_alloc()
      https://git.kernel.org/lpieralisi/pci/c/1e83130f01

Thanks,
Lorenzo

Patch
diff mbox series

diff --git a/drivers/pci/controller/pcie-iproc-msi.c b/drivers/pci/controller/pcie-iproc-msi.c
index 908475d27e0e..eede4e8f3f75 100644
--- a/drivers/pci/controller/pcie-iproc-msi.c
+++ b/drivers/pci/controller/pcie-iproc-msi.c
@@ -271,7 +271,7 @@  static int iproc_msi_irq_domain_alloc(struct irq_domain *domain,
 				    NULL, NULL);
 	}
 
-	return hwirq;
+	return 0;
 }
 
 static void iproc_msi_irq_domain_free(struct irq_domain *domain,