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: <20160224180913.GN21240@tuxbot>
Date:	Wed, 24 Feb 2016 10:09:13 -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, bcm-kernel-feedback-list@...adcom.com,
	linux-rpi-kernel@...ts.infradead.org,
	Bjorn Andersson <bjorn.andersson@...ymobile.com>,
	linux-mediatek@...ts.infradead.org,
	linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 20/50] pinctrl: ssbi-mpp: 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: Bjorn Andersson <bjorn.andersson@...ymobile.com>
> ---

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

Regards,
Bjorn

>  drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c b/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c
> index 54a5402..49cc734 100644
> --- a/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c
> +++ b/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c
> @@ -820,7 +820,7 @@ static int pm8xxx_mpp_probe(struct platform_device *pdev)
>  	pctrl->desc.custom_conf_items = pm8xxx_conf_items;
>  #endif
>  
> -	pctrl->pctrl = pinctrl_register(&pctrl->desc, &pdev->dev, pctrl);
> +	pctrl->pctrl = devm_pinctrl_register(&pdev->dev, &pctrl->desc, pctrl);
>  	if (IS_ERR(pctrl->pctrl)) {
>  		dev_err(&pdev->dev, "couldn't register pm8xxx mpp driver\n");
>  		return PTR_ERR(pctrl->pctrl);
> @@ -836,7 +836,7 @@ static int pm8xxx_mpp_probe(struct platform_device *pdev)
>  	ret = gpiochip_add_data(&pctrl->chip, pctrl);
>  	if (ret) {
>  		dev_err(&pdev->dev, "failed register gpiochip\n");
> -		goto unregister_pinctrl;
> +		return ret;
>  	}
>  
>  	ret = gpiochip_add_pin_range(&pctrl->chip,
> @@ -856,9 +856,6 @@ static int pm8xxx_mpp_probe(struct platform_device *pdev)
>  unregister_gpiochip:
>  	gpiochip_remove(&pctrl->chip);
>  
> -unregister_pinctrl:
> -	pinctrl_unregister(pctrl->pctrl);
> -
>  	return ret;
>  }
>  
> @@ -868,8 +865,6 @@ static int pm8xxx_mpp_remove(struct platform_device *pdev)
>  
>  	gpiochip_remove(&pctrl->chip);
>  
> -	pinctrl_unregister(pctrl->pctrl);
> -
>  	return 0;
>  }
>  
> -- 
> 2.1.4
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@...ts.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ