[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <552E2B53.8030002@samsung.com>
Date: Wed, 15 Apr 2015 11:11:47 +0200
From: Jacek Anaszewski <j.anaszewski@...sung.com>
To: Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>
Cc: Bryan Wu <cooloney@...il.com>, Richard Purdie <rpurdie@...ys.net>,
linux-leds@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] leds: gpio: Fix device teardown on probe deferral
Hi Sebastian,
On 04/14/2015 11:23 PM, Sebastian Hesselbarth wrote:
> In gpio_leds_create(), when devm_get_gpiod_from_child() fails with
> -EPROBE_DEFER on the second gpio led to be created, the first already
> registered led is not torn down properly. This causes create_gpio_led()
> to fail for the first led on re-probe().
>
> Fix this misbehaviour by incrementing num_leds only if all
> potentially failing calls completed successfully.
>
> Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>
> ---
> Cc: Bryan Wu <cooloney@...il.com>
> Cc: Richard Purdie <rpurdie@...ys.net>
> Cc: linux-leds@...r.kernel.org
> Cc: linux-kernel@...r.kernel.org
> ---
> drivers/leds/leds-gpio.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
For this patch:
Acked-by: Jacek Anaszewski <j.anaszewski@...sung.com>
I have a question regarding the sequence above on line 201:
if (!led.name)
return ERR_PTR(-EINVAL);
Shouldn't this be also 'goto err"?
--
Best Regards,
Jacek Anaszewski
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists