mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 07:38:10 +00:00
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: Bartosz Golaszewski <brgl@bgdev.pl> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
c47bee95f6
commit
1e0dca677b
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue