lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-id: <55D30A6B.5060304@samsung.com>
Date:	Tue, 18 Aug 2015 12:35:23 +0200
From:	Jacek Anaszewski <j.anaszewski@...sung.com>
To:	Bjorn Andersson <bjorn.andersson@...ymobile.com>
Cc:	Bryan Wu <cooloney@...il.com>, Richard Purdie <rpurdie@...ys.net>,
	Linus Walleij <linus.walleij@...aro.org>,
	linux-leds@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] leds: syscon: Correct check for syscon_node_to_regmap()
 errors

Hi Bjor,

On 08/17/2015 06:18 PM, Bjorn Andersson wrote:
> syscon_node_to_regmap() returns a regmap or an ERR_PTR().
>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@...ymobile.com>
> ---
>   drivers/leds/leds-syscon.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/leds/leds-syscon.c b/drivers/leds/leds-syscon.c
> index d1660b039812..39fca4c9f1ee 100644
> --- a/drivers/leds/leds-syscon.c
> +++ b/drivers/leds/leds-syscon.c
> @@ -83,7 +83,7 @@ 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) ?

>   	}
>


-- 
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ