diff options
author | Bartosz Golaszewski <brgl@bgdev.pl> | 2017-06-09 14:41:29 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2017-06-20 10:18:59 +0300 |
commit | 4dc9d76c983db100ec91b65f6cee804871e5102f (patch) | |
tree | 189a63c7715324ebdd7305a462300361a821f02a /drivers/gpio/gpio-mockup.c | |
parent | b652336d3fb70b95a5b0a5ea3a32e7116b15be29 (diff) | |
download | linux-4dc9d76c983db100ec91b65f6cee804871e5102f.tar.xz |
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>
Diffstat (limited to 'drivers/gpio/gpio-mockup.c')
-rw-r--r-- | drivers/gpio/gpio-mockup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-mockup.c b/drivers/gpio/gpio-mockup.c index 0cb6cbacc069..ab2d38e491bc 100644 --- a/drivers/gpio/gpio-mockup.c +++ b/drivers/gpio/gpio-mockup.c @@ -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) { |