forked from luck/tmp_suning_uos_patched
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],
|
||||
chip_name, base, ngpio);
|
||||
} else {
|
||||
ret = -1;
|
||||
ret = -EINVAL;
|
||||
}
|
||||
|
||||
if (ret) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user