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


Groups > linux.kernel > #1291063 > unrolled thread

Re: [PATCH 12/38] HSI: omap_ssi_port: fix handling of_get_named_gpio result

Started byAndrzej Hajda <a.hajda@samsung.com>
First post2015-12-14 11:30 +0100
Last post2015-12-14 11:30 +0100
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 12/38] HSI: omap_ssi_port: fix handling of_get_named_gpio  result Andrzej Hajda <a.hajda@samsung.com> - 2015-12-14 11:30 +0100

#1291063 — Re: [PATCH 12/38] HSI: omap_ssi_port: fix handling of_get_named_gpio result

FromAndrzej Hajda <a.hajda@samsung.com>
Date2015-12-14 11:30 +0100
SubjectRe: [PATCH 12/38] HSI: omap_ssi_port: fix handling of_get_named_gpio result
Message-ID<qFyyf-4PE-23@gated-at.bofh.it>
Hi,

Ping - almost three months passed.

Regards
Andrzej


On 09/21/2015 03:33 PM, Andrzej Hajda wrote:
> The function can return negative value.
>
> The problem has been detected using proposed semantic patch
> scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].
>
> [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576
>
> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
> ---
>  drivers/hsi/controllers/omap_ssi_port.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/hsi/controllers/omap_ssi_port.c b/drivers/hsi/controllers/omap_ssi_port.c
> index 1f8652b..d93dd09 100644
> --- a/drivers/hsi/controllers/omap_ssi_port.c
> +++ b/drivers/hsi/controllers/omap_ssi_port.c
> @@ -1147,13 +1147,13 @@ static int __init ssi_port_probe(struct platform_device *pd)
>  		goto error;
>  	}
>  
> -	cawake_gpio = of_get_named_gpio(np, "ti,ssi-cawake-gpio", 0);
> -	if (cawake_gpio < 0) {
> +	err = of_get_named_gpio(np, "ti,ssi-cawake-gpio", 0);
> +	if (err < 0) {
>  		dev_err(&pd->dev, "DT data is missing cawake gpio (err=%d)\n",
> -			cawake_gpio);
> -		err = -ENODEV;
> +			err);
>  		goto error;
>  	}
> +	cawake_gpio = err;
>  
>  	err = devm_gpio_request_one(&port->device, cawake_gpio, GPIOF_DIR_IN,
>  		"cawake");

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