forked from Minki/linux
gpio: mockup: don't return magic numbers from probe()
When the requested number of GPIO lines is 0, return -EINVAL, not -1 which is -EPERM. Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
b652336d3f
commit
4dc9d76c98
@ -369,7 +369,7 @@ static int gpio_mockup_probe(struct platform_device *pdev)
|
|||||||
ret = gpio_mockup_add(dev, &chips[i],
|
ret = gpio_mockup_add(dev, &chips[i],
|
||||||
chip_name, base, ngpio);
|
chip_name, base, ngpio);
|
||||||
} else {
|
} else {
|
||||||
ret = -1;
|
ret = -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret) {
|
if (ret) {
|
||||||
|
Loading…
Reference in New Issue
Block a user