mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
2099920ebe
commit
e42039452b
|
@ -1909,6 +1909,12 @@ static int stm32_fmc2_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
irq = platform_get_irq(pdev, 0);
|
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,
|
ret = devm_request_irq(dev, irq, stm32_fmc2_irq, 0,
|
||||||
dev_name(dev), fmc2);
|
dev_name(dev), fmc2);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
|
|
Loading…
Reference in New Issue