Return -ENOMEM instead of 0 if irq_domain_add_linear fails.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
U300_GPIO_PINS_PER_PORT,
&irq_domain_simple_ops,
port);
- if (!port->domain)
+ if (!port->domain) {
+ err = -ENOMEM;
goto err_no_domain;
+ }
irq_set_chained_handler(port->irq, u300_gpio_irq_handler);
irq_set_handler_data(port->irq, port);
err_no_port:
u300_gpio_free_ports(gpio);
clk_disable_unprepare(gpio->clk);
- dev_info(&pdev->dev, "module ERROR:%d\n", err);
+ dev_err(&pdev->dev, "module ERROR:%d\n", err);
return err;
}