提交 2f2ff14c 编写于 作者: S Sachin Kamat 提交者: David Woodhouse

mtd: denali_dt: Change return value to fix smatch warning

platform_get_irq() also returns -ENXIO upon failure.
Use it instead of hardcoded return type.

Fixes the following smatch warning:
drivers/mtd/nand/denali_dt.c:93 denali_dt_probe() info:
why not propagate 'denali->irq' from platform_get_irq() instead of (-6)?
Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
上级 82fc812c
...@@ -90,7 +90,7 @@ static int denali_dt_probe(struct platform_device *ofdev) ...@@ -90,7 +90,7 @@ static int denali_dt_probe(struct platform_device *ofdev)
denali->irq = platform_get_irq(ofdev, 0); denali->irq = platform_get_irq(ofdev, 0);
if (denali->irq < 0) { if (denali->irq < 0) {
dev_err(&ofdev->dev, "no irq defined\n"); dev_err(&ofdev->dev, "no irq defined\n");
return -ENXIO; return denali->irq;
} }
denali->flash_reg = request_and_map(&ofdev->dev, denali_reg); denali->flash_reg = request_and_map(&ofdev->dev, denali_reg);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册