gpiolib: do not allow to insert an empty gpiochip
commit 5ed41cc4 upstream. We need to check if number of gpio is positive if there is no such check in devicetree or acpi or whatever called before gpiochip_add. I suppose that devicetree and acpi do not allow insert gpiochip with zero number but I do not know if it is enough to ignore this check in gpiochip_add. Signed-off-by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> [ kamal: 4.2-stable prereq ] Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Showing
Please register or sign in to comment