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]
Date:	Mon, 30 Jun 2014 11:34:29 +0200
From:	Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>
To:	Himangi Saraogi <himangi774@...il.com>,
	Linus Walleij <linus.walleij@...aro.org>,
	linux-kernel@...r.kernel.org
CC:	julia.lawall@...6.fr
Subject: Re: [PATCH] pinctrl: berlin: fix return value for dev_get_regmap

On 06/29/2014 09:18 AM, Himangi Saraogi wrote:
> The failure value of dev_get_regmap is NULL. Hence, the return value is
> changed to -ENODEV.
>
> A simplified version of the semantic match that finds this problem is as
> follows:
>
> // <smpl>
> @@
> expression e1;
> @@
>
> * if (!e1)
>    return PTR_ERR(e1);
>
> // </smpl>
>
> Signed-off-by: Himangi Saraogi <himangi774@...il.com>
> Acked-by: Julia Lawall <julia.lawall@...6.fr>

Himangi,

thanks for the fix, but we already have a similar patch [1] pending.

Sebastian

[1] http://www.spinics.net/lists/linux-kernel-janitors/msg19125.html

> ---
>   drivers/pinctrl/berlin/berlin.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/berlin/berlin.c b/drivers/pinctrl/berlin/berlin.c
> index edf5d2f..86db223 100644
> --- a/drivers/pinctrl/berlin/berlin.c
> +++ b/drivers/pinctrl/berlin/berlin.c
> @@ -320,7 +320,7 @@ int berlin_pinctrl_probe(struct platform_device *pdev,
>
>   	regmap = dev_get_regmap(&pdev->dev, NULL);
>   	if (!regmap)
> -		return PTR_ERR(regmap);
> +		return -ENODEV;
>
>   	pctrl = devm_kzalloc(dev, sizeof(*pctrl), GFP_KERNEL);
>   	if (!pctrl)
>

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