All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] peci: Fix platform_get_irq() error checking
@ 2022-08-11 10:49 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2022-08-11 10:49 UTC (permalink / raw)
  To: Iwona Winiarska
  Cc: Joel Stanley, Andrew Jeffery, Pierre-Louis Bossart, Jae Hyun Yoo,
	Greg Kroah-Hartman, linux-aspeed, openbmc, kernel-janitors

The platform_get_irq() function returns success or negative error codes
on failure.

Fixes: a85e4c52086c ("peci: Add peci-aspeed controller driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/peci/controller/peci-aspeed.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/peci/controller/peci-aspeed.c b/drivers/peci/controller/peci-aspeed.c
index 1925ddc13f00..731c5d8f75c6 100644
--- a/drivers/peci/controller/peci-aspeed.c
+++ b/drivers/peci/controller/peci-aspeed.c
@@ -523,7 +523,7 @@ static int aspeed_peci_probe(struct platform_device *pdev)
 		return PTR_ERR(priv->base);
 
 	priv->irq = platform_get_irq(pdev, 0);
-	if (!priv->irq)
+	if (priv->irq < 0)
 		return priv->irq;
 
 	ret = devm_request_irq(&pdev->dev, priv->irq, aspeed_peci_irq_handler,
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] peci: Fix platform_get_irq() error checking
@ 2022-08-11 10:49 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2022-08-11 10:49 UTC (permalink / raw)
  To: Iwona Winiarska
  Cc: Jae Hyun Yoo, linux-aspeed, Andrew Jeffery, Greg Kroah-Hartman,
	openbmc, kernel-janitors, Pierre-Louis Bossart, Joel Stanley

The platform_get_irq() function returns success or negative error codes
on failure.

Fixes: a85e4c52086c ("peci: Add peci-aspeed controller driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/peci/controller/peci-aspeed.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/peci/controller/peci-aspeed.c b/drivers/peci/controller/peci-aspeed.c
index 1925ddc13f00..731c5d8f75c6 100644
--- a/drivers/peci/controller/peci-aspeed.c
+++ b/drivers/peci/controller/peci-aspeed.c
@@ -523,7 +523,7 @@ static int aspeed_peci_probe(struct platform_device *pdev)
 		return PTR_ERR(priv->base);
 
 	priv->irq = platform_get_irq(pdev, 0);
-	if (!priv->irq)
+	if (priv->irq < 0)
 		return priv->irq;
 
 	ret = devm_request_irq(&pdev->dev, priv->irq, aspeed_peci_irq_handler,
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] peci: Fix platform_get_irq() error checking
  2022-08-11 10:49 ` Dan Carpenter
@ 2022-08-15 19:19   ` Winiarska, Iwona
  -1 siblings, 0 replies; 4+ messages in thread
From: Winiarska, Iwona @ 2022-08-15 19:19 UTC (permalink / raw)
  To: dan.carpenter@oracle.com
  Cc: jae.hyun.yoo@linux.intel.com, linux-aspeed@lists.ozlabs.org,
	andrew@aj.id.au, gregkh@linuxfoundation.org,
	openbmc@lists.ozlabs.org, kernel-janitors@vger.kernel.org,
	pierre-louis.bossart@linux.intel.com, joel@jms.id.au

On Thu, 2022-08-11 at 13:49 +0300, Dan Carpenter wrote:
> The platform_get_irq() function returns success or negative error codes
> on failure.

Hi,

The patch that fixes this problem was already picked up:
https://git.kernel.org/pub/scm/linux/kernel/git/iwi/linux.git/commit/?h=peci-next&id=e79b548b7202bb3accdfe64f113129a4340bc2f9

Thanks
-Iwona

> 
> Fixes: a85e4c52086c ("peci: Add peci-aspeed controller driver")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
>  drivers/peci/controller/peci-aspeed.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/peci/controller/peci-aspeed.c
> b/drivers/peci/controller/peci-aspeed.c
> index 1925ddc13f00..731c5d8f75c6 100644
> --- a/drivers/peci/controller/peci-aspeed.c
> +++ b/drivers/peci/controller/peci-aspeed.c
> @@ -523,7 +523,7 @@ static int aspeed_peci_probe(struct platform_device *pdev)
>                 return PTR_ERR(priv->base);
>  
>         priv->irq = platform_get_irq(pdev, 0);
> -       if (!priv->irq)
> +       if (priv->irq < 0)
>                 return priv->irq;
>  
>         ret = devm_request_irq(&pdev->dev, priv->irq, aspeed_peci_irq_handler,


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] peci: Fix platform_get_irq() error checking
@ 2022-08-15 19:19   ` Winiarska, Iwona
  0 siblings, 0 replies; 4+ messages in thread
From: Winiarska, Iwona @ 2022-08-15 19:19 UTC (permalink / raw)
  To: dan.carpenter@oracle.com
  Cc: kernel-janitors@vger.kernel.org, jae.hyun.yoo@linux.intel.com,
	joel@jms.id.au, gregkh@linuxfoundation.org,
	linux-aspeed@lists.ozlabs.org, andrew@aj.id.au,
	pierre-louis.bossart@linux.intel.com, openbmc@lists.ozlabs.org

On Thu, 2022-08-11 at 13:49 +0300, Dan Carpenter wrote:
> The platform_get_irq() function returns success or negative error codes
> on failure.

Hi,

The patch that fixes this problem was already picked up:
https://git.kernel.org/pub/scm/linux/kernel/git/iwi/linux.git/commit/?h=peci-next&id=e79b548b7202bb3accdfe64f113129a4340bc2f9

Thanks
-Iwona

> 
> Fixes: a85e4c52086c ("peci: Add peci-aspeed controller driver")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
>  drivers/peci/controller/peci-aspeed.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/peci/controller/peci-aspeed.c
> b/drivers/peci/controller/peci-aspeed.c
> index 1925ddc13f00..731c5d8f75c6 100644
> --- a/drivers/peci/controller/peci-aspeed.c
> +++ b/drivers/peci/controller/peci-aspeed.c
> @@ -523,7 +523,7 @@ static int aspeed_peci_probe(struct platform_device *pdev)
>                 return PTR_ERR(priv->base);
>  
>         priv->irq = platform_get_irq(pdev, 0);
> -       if (!priv->irq)
> +       if (priv->irq < 0)
>                 return priv->irq;
>  
>         ret = devm_request_irq(&pdev->dev, priv->irq, aspeed_peci_irq_handler,


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-08-15 21:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-11 10:49 [PATCH] peci: Fix platform_get_irq() error checking Dan Carpenter
2022-08-11 10:49 ` Dan Carpenter
2022-08-15 19:19 ` Winiarska, Iwona
2022-08-15 19:19   ` Winiarska, Iwona

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.