Skip to content

Commit e420394

Browse files
FDESTMmiquelraynal
authored andcommitted
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>
1 parent 2099920 commit e420394

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎drivers/mtd/nand/raw/stm32_fmc2_nand.c‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1909,6 +1909,12 @@ static int stm32_fmc2_probe(struct platform_device *pdev)
19091909
}
19101910

19111911
irq = platform_get_irq(pdev, 0);
1912+
if (irq < 0) {
1913+
if (irq != -EPROBE_DEFER)
1914+
dev_err(dev, "IRQ error missing or invalid\n");
1915+
return irq;
1916+
}
1917+
19121918
ret = devm_request_irq(dev, irq, stm32_fmc2_irq, 0,
19131919
dev_name(dev), fmc2);
19141920
if (ret) {

0 commit comments

Comments
 (0)