[Letux-kernel] [PATCH] gpio: add another error check for missing gpiochips
H. Nikolaus Schaller
hns at goldelico.com
Sat Jun 4 16:32:12 CEST 2016
Thanks,
merged into work/hacks fine and works :)
BR,
Nikolaus
> Am 04.06.2016 um 14:19 schrieb Andreas Kemnade <andreas at kemnade.info>:
>
> Signed-off-by: Andreas Kemnade <andreas at kemnade.info>
> ---
> drivers/gpio/gpiolib-of.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
> index d22dcc3..3f1b2e9 100644
> --- a/drivers/gpio/gpiolib-of.c
> +++ b/drivers/gpio/gpiolib-of.c
> @@ -39,7 +39,10 @@ static int of_gpiochip_find_and_xlate(struct gpio_chip *gc, void *data)
> {
> struct gg_data *gg_data = data;
> int ret;
> -
> + if (gc == NULL) {
> + printk("gpiolibof_match chip is missing\n");
> + return false;
> + }
> if ((gc->of_node != gg_data->gpiospec.np) ||
> (gc->of_gpio_n_cells != gg_data->gpiospec.args_count) ||
> (!gc->of_xlate))
> --
> 2.1.4
>
> _______________________________________________
> http://projects.goldelico.com/p/gta04-kernel/
> Letux-kernel mailing list
> Letux-kernel at openphoenux.org
> http://lists.goldelico.com/mailman/listinfo.cgi/letux-kernel
More information about the Letux-kernel
mailing list