Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1211902 > unrolled thread

Re: [PATCH v2] leds: syscon: Correct check for syscon_node_to_regmap() errors

Started byJacek Anaszewski <j.anaszewski@samsung.com>
First post2015-08-24 10:30 +0200
Last post2015-08-24 10:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v2] leds: syscon: Correct check for syscon_node_to_regmap()  errors Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-08-24 10:30 +0200

#1211902 — Re: [PATCH v2] leds: syscon: Correct check for syscon_node_to_regmap() errors

FromJacek Anaszewski <j.anaszewski@samsung.com>
Date2015-08-24 10:30 +0200
SubjectRe: [PATCH v2] leds: syscon: Correct check for syscon_node_to_regmap() errors
Message-ID<q0ViG-2dY-9@gated-at.bofh.it>
On 08/18/2015 09:25 PM, Bjorn Andersson wrote:
> syscon_node_to_regmap() returns a regmap or an ERR_PTR().
>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
> ---
>
> Changes since v1:
> - Propagate the error
>
>   drivers/leds/leds-syscon.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/leds/leds-syscon.c b/drivers/leds/leds-syscon.c
> index d1660b039812..b88900d721e4 100644
> --- a/drivers/leds/leds-syscon.c
> +++ b/drivers/leds/leds-syscon.c
> @@ -83,9 +83,9 @@ static int syscon_led_probe(struct platform_device *pdev)
>   		return -ENODEV;
>   	}
>   	map = syscon_node_to_regmap(parent->of_node);
> -	if (!map) {
> +	if (IS_ERR(map)) {
>   		dev_err(dev, "no regmap for syscon LED parent\n");
> -		return -ENODEV;
> +		return PTR_ERR(map);
>   	}
>
>   	sled = devm_kzalloc(dev, sizeof(*sled), GFP_KERNEL);
>

Merged, thanks.

-- 
Best Regards,
Jacek Anaszewski
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web