提交 e4203945 编写于 作者: F Fabien Dessenne 提交者: Miquel Raynal

mtd: rawnand: stm32_fmc2: manage the get_irq error case

During probe, check the "get_irq" error value.
Signed-off-by: NFabien Dessenne <fabien.dessenne@st.com>
Acked-by: NChristophe Kerello <christophe.kerello@st.com>
Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
上级 2099920e
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册