gpio: mockup: verify that ngpio > 0
authorBartosz Golaszewski <brgl@bgdev.pl>
Mon, 27 Nov 2017 10:48:49 +0000 (11:48 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Sat, 2 Dec 2017 21:42:28 +0000 (22:42 +0100)
commitfa86963a7546e08efdb32153522c1a42de069c8b
tree406ed558fb99f99a7449b5f8a5ad43985410ff14
parent46526c15cadcba43c69e22a6dfaf3f6f444c70aa
gpio: mockup: verify that ngpio > 0

Improve the module params sanitization: bail out from init if the user
tries to pass a non-positive number of GPIO lines for any mockup chip.

Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-mockup.c