提交 1e0dca67 编写于 作者: B Bartosz Golaszewski 提交者: Linus Walleij

gpio: mockup: modify the return value check for devm_irq_sim_init()

As discussed with Marc Zyngier: irq_sim_init() and its devres variant
should return the base of the allocated interrupt range on success
rather than 0. This will be modified later - first, change the way
users handle the return value of these routines.
Signed-off-by: NBartosz Golaszewski <brgl@bgdev.pl>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 c47bee95
......@@ -297,7 +297,7 @@ static int gpio_mockup_probe(struct platform_device *pdev)
}
rv = devm_irq_sim_init(dev, &chip->irqsim, gc->ngpio);
if (rv)
if (rv < 0)
return rv;
rv = devm_gpiochip_add_data(dev, &chip->gc, chip);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册