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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160224180637.GK21240@tuxbot>
Date:	Wed, 24 Feb 2016 10:06:37 -0800
From:	Bjorn Andersson <bjorn.andersson@...aro.org>
To:	Laxman Dewangan <ldewangan@...dia.com>
Cc:	linus.walleij@...aro.org, corbet@....net, lee@...nel.org,
	linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-gpio@...r.kernel.org, linux-rpi-kernel@...ts.infradead.org,
	linux-arm-kernel@...ts.infradead.org,
	bcm-kernel-feedback-list@...adcom.com,
	linux-mediatek@...ts.infradead.org,
	Bj?rn Andersson <bjorn.andersson@...ymobile.com>,
	"Ivan T. Ivanov" <ivan.ivanov@...aro.org>,
	Lee Jones <lee.jones@...aro.org>,
	Stephen Boyd <sboyd@...eaurora.org>,
	Jonas Gorski <jogo@...nwrt.org>
Subject: Re: [PATCH 17/50] pinctrl: spmi-gpio: Use devm_pinctrl_register()
 for pinctrl registration

On Wed 24 Feb 05:15 PST 2016, Laxman Dewangan wrote:

> Use devm_pinctrl_register() for pin control registration and clean
> the error path.
> 
> Signed-off-by: Laxman Dewangan <ldewangan@...dia.com>
> Cc: "Ivan T. Ivanov" <ivan.ivanov@...aro.org>
> Cc: Lee Jones <lee.jones@...aro.org>
> Cc: Stephen Boyd <sboyd@...eaurora.org>
> Cc: Jonas Gorski <jogo@...nwrt.org>
> ---

Reviewed-by Bjorn Andersson <bjorn.andersson@...aro.org>

Regards,
Bjorn

>  drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
> index 4e12ded..330e822 100644
> --- a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
> +++ b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
> @@ -764,14 +764,14 @@ static int pmic_gpio_probe(struct platform_device *pdev)
>  	state->chip.of_gpio_n_cells = 2;
>  	state->chip.can_sleep = false;
>  
> -	state->ctrl = pinctrl_register(pctrldesc, dev, state);
> +	state->ctrl = devm_pinctrl_register(dev, pctrldesc, state);
>  	if (IS_ERR(state->ctrl))
>  		return PTR_ERR(state->ctrl);
>  
>  	ret = gpiochip_add_data(&state->chip, state);
>  	if (ret) {
>  		dev_err(state->dev, "can't add gpio chip\n");
> -		goto err_chip;
> +		return ret;
>  	}
>  
>  	ret = gpiochip_add_pin_range(&state->chip, dev_name(dev), 0, 0, npins);
> @@ -784,8 +784,6 @@ static int pmic_gpio_probe(struct platform_device *pdev)
>  
>  err_range:
>  	gpiochip_remove(&state->chip);
> -err_chip:
> -	pinctrl_unregister(state->ctrl);
>  	return ret;
>  }
>  
> @@ -794,7 +792,6 @@ static int pmic_gpio_remove(struct platform_device *pdev)
>  	struct pmic_gpio_state *state = platform_get_drvdata(pdev);
>  
>  	gpiochip_remove(&state->chip);
> -	pinctrl_unregister(state->ctrl);
>  	return 0;
>  }
>  
> -- 
> 2.1.4
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ