mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 23:58:05 +00:00
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
1 changed files with 1 additions and 1 deletions
|
@ -369,7 +369,7 @@ static int gpio_mockup_probe(struct platform_device *pdev)
|
|||
ret = gpio_mockup_add(dev, &chips[i],
|
||||
chip_name, base, ngpio);
|
||||
} else {
|
||||
ret = -1;
|
||||
ret = -EINVAL;
|
||||
}
|
||||
|
||||
if (ret) {
|
||||
|
|
Loading…
Reference in a new issue