lkml.org 
[lkml]   [2019]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] mtd: rawnand: stm32_fmc2: manage the get_irq error case
From
Date


On 4/24/19 4:49 PM, Fabien Dessenne wrote:
> 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>

> ---
> drivers/mtd/nand/raw/stm32_fmc2_nand.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
> index 999ca6a..4aabea2 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) {
>

\
 
 \ /
  Last update: 2019-04-25 10:00    [W:0.049 / U:5.912 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site