summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand
diff options
context:
space:
mode:
authorFabien Dessenne <fabien.dessenne@st.com>2019-04-24 16:49:06 +0200
committerMiquel Raynal <miquel.raynal@bootlin.com>2019-06-27 20:05:23 +0200
commite42039452bc73d8d80df19d3b60a43eac2ad3b8b (patch)
treee4f98ed7fa4542f5a4d02cd2bb509cf5910aa728 /drivers/mtd/nand
parent2099920ebeca38584d645969cb3a8698ca6c3450 (diff)
mtd: rawnand: stm32_fmc2: manage the get_irq error case
During probe, check the "get_irq" error value. Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com> Acked-by: Christophe Kerello <christophe.kerello@st.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r--drivers/mtd/nand/raw/stm32_fmc2_nand.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
index 999ca6a66036..4aabea25cd7d 100644
--- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c
+++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
@@ -1909,6 +1909,12 @@ static int stm32_fmc2_probe(struct platform_device *pdev)
}
irq = platform_get_irq(pdev, 0);
+ if (irq < 0) {
+ if (irq != -EPROBE_DEFER)
+ dev_err(dev, "IRQ error missing or invalid\n");
+ return irq;
+ }
+
ret = devm_request_irq(dev, irq, stm32_fmc2_irq, 0,
dev_name(dev), fmc2);
if (ret) {