All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mtd: rawnand: tegra: add missing check for platform_get_irq()
@ 2023-08-21  8:40 ` Yi Yang
  0 siblings, 0 replies; 4+ messages in thread
From: Yi Yang @ 2023-08-21  8:40 UTC (permalink / raw)
  To: stefan, dev, miquel.raynal, richard, vigneshr
  Cc: thierry.reding, jonathanh, linux-mtd, linux-tegra

Add the missing check for platform_get_irq() and return error code
if it fails.

Fixes: d7d9f8ec77fe ("mtd: rawnand: add NVIDIA Tegra NAND Flash controller driver")
Signed-off-by: Yi Yang <yiyang13@huawei.com>
---
 drivers/mtd/nand/raw/tegra_nand.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/mtd/nand/raw/tegra_nand.c b/drivers/mtd/nand/raw/tegra_nand.c
index eb0b9d16e8da..a553e3ac8ff4 100644
--- a/drivers/mtd/nand/raw/tegra_nand.c
+++ b/drivers/mtd/nand/raw/tegra_nand.c
@@ -1197,6 +1197,10 @@ static int tegra_nand_probe(struct platform_device *pdev)
 	init_completion(&ctrl->dma_complete);
 
 	ctrl->irq = platform_get_irq(pdev, 0);
+	if (ctrl->irq < 0) {
+		err = ctrl->irq;
+		goto err_put_pm;
+	}
 	err = devm_request_irq(&pdev->dev, ctrl->irq, tegra_nand_irq, 0,
 			       dev_name(&pdev->dev), ctrl);
 	if (err) {
-- 
2.17.1


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

* [PATCH] mtd: rawnand: tegra: add missing check for platform_get_irq()
@ 2023-08-21  8:40 ` Yi Yang
  0 siblings, 0 replies; 4+ messages in thread
From: Yi Yang @ 2023-08-21  8:40 UTC (permalink / raw)
  To: stefan, dev, miquel.raynal, richard, vigneshr
  Cc: thierry.reding, jonathanh, linux-mtd, linux-tegra

Add the missing check for platform_get_irq() and return error code
if it fails.

Fixes: d7d9f8ec77fe ("mtd: rawnand: add NVIDIA Tegra NAND Flash controller driver")
Signed-off-by: Yi Yang <yiyang13@huawei.com>
---
 drivers/mtd/nand/raw/tegra_nand.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/mtd/nand/raw/tegra_nand.c b/drivers/mtd/nand/raw/tegra_nand.c
index eb0b9d16e8da..a553e3ac8ff4 100644
--- a/drivers/mtd/nand/raw/tegra_nand.c
+++ b/drivers/mtd/nand/raw/tegra_nand.c
@@ -1197,6 +1197,10 @@ static int tegra_nand_probe(struct platform_device *pdev)
 	init_completion(&ctrl->dma_complete);
 
 	ctrl->irq = platform_get_irq(pdev, 0);
+	if (ctrl->irq < 0) {
+		err = ctrl->irq;
+		goto err_put_pm;
+	}
 	err = devm_request_irq(&pdev->dev, ctrl->irq, tegra_nand_irq, 0,
 			       dev_name(&pdev->dev), ctrl);
 	if (err) {
-- 
2.17.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [PATCH] mtd: rawnand: tegra: add missing check for platform_get_irq()
  2023-08-21  8:40 ` Yi Yang
@ 2023-09-12 10:35   ` Miquel Raynal
  -1 siblings, 0 replies; 4+ messages in thread
From: Miquel Raynal @ 2023-09-12 10:35 UTC (permalink / raw)
  To: Yi Yang, stefan, dev, miquel.raynal, richard, vigneshr
  Cc: thierry.reding, jonathanh, linux-mtd, linux-tegra

On Mon, 2023-08-21 at 08:40:46 UTC, Yi Yang wrote:
> Add the missing check for platform_get_irq() and return error code
> if it fails.
> 
> Fixes: d7d9f8ec77fe ("mtd: rawnand: add NVIDIA Tegra NAND Flash controller driver")
> Signed-off-by: Yi Yang <yiyang13@huawei.com>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.

Miquel

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [PATCH] mtd: rawnand: tegra: add missing check for platform_get_irq()
@ 2023-09-12 10:35   ` Miquel Raynal
  0 siblings, 0 replies; 4+ messages in thread
From: Miquel Raynal @ 2023-09-12 10:35 UTC (permalink / raw)
  To: Yi Yang, stefan, dev, miquel.raynal, richard, vigneshr
  Cc: thierry.reding, jonathanh, linux-mtd, linux-tegra

On Mon, 2023-08-21 at 08:40:46 UTC, Yi Yang wrote:
> Add the missing check for platform_get_irq() and return error code
> if it fails.
> 
> Fixes: d7d9f8ec77fe ("mtd: rawnand: add NVIDIA Tegra NAND Flash controller driver")
> Signed-off-by: Yi Yang <yiyang13@huawei.com>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.

Miquel

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

end of thread, other threads:[~2023-09-12 10:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-21  8:40 [PATCH] mtd: rawnand: tegra: add missing check for platform_get_irq() Yi Yang
2023-08-21  8:40 ` Yi Yang
2023-09-12 10:35 ` Miquel Raynal
2023-09-12 10:35   ` Miquel Raynal

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.