LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Michal Simek <michal.simek@xilinx.com>
To: Yang Yingliang <yangyingliang@huawei.com>,
	<linux-kernel@vger.kernel.org>
Cc: <linus.walleij@linaro.org>, <michal.simek@xilinx.com>,
	<lakshmi.sai.krishna.potthuri@xilinx.com>
Subject: Re: [PATCH] pinctrl: zynqmp: Drop pinctrl_unregister for devm_ registered device
Date: Fri, 6 Aug 2021 09:45:53 +0200	[thread overview]
Message-ID: <b3b4a3a7-17b1-4317-143c-925785b8c687@xilinx.com> (raw)
In-Reply-To: <20210729071905.3235953-1-yangyingliang@huawei.com>



On 7/29/21 9:19 AM, Yang Yingliang wrote:
> It's not necessary to unregister pin controller device registered
> with devm_pinctrl_register() and using pinctrl_unregister() leads
> to a double free.
> 
> Fixes: fa99e7013827 ("pinctrl: zynqmp: some code cleanups")
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
>  drivers/pinctrl/pinctrl-zynqmp.c | 10 ----------
>  1 file changed, 10 deletions(-)
> 
> diff --git a/drivers/pinctrl/pinctrl-zynqmp.c b/drivers/pinctrl/pinctrl-zynqmp.c
> index bbde676b7313..e14012209992 100644
> --- a/drivers/pinctrl/pinctrl-zynqmp.c
> +++ b/drivers/pinctrl/pinctrl-zynqmp.c
> @@ -866,15 +866,6 @@ static int zynqmp_pinctrl_probe(struct platform_device *pdev)
>  	return ret;
>  }
>  
> -static int zynqmp_pinctrl_remove(struct platform_device *pdev)
> -{
> -	struct zynqmp_pinctrl *pctrl = platform_get_drvdata(pdev);
> -
> -	pinctrl_unregister(pctrl->pctrl);
> -
> -	return 0;
> -}
> -
>  static const struct of_device_id zynqmp_pinctrl_of_match[] = {
>  	{ .compatible = "xlnx,zynqmp-pinctrl" },
>  	{ }
> @@ -887,7 +878,6 @@ static struct platform_driver zynqmp_pinctrl_driver = {
>  		.of_match_table = zynqmp_pinctrl_of_match,
>  	},
>  	.probe = zynqmp_pinctrl_probe,
> -	.remove = zynqmp_pinctrl_remove,
>  };
>  module_platform_driver(zynqmp_pinctrl_driver);
>  
>

Reviewed-by: Michal Simek <michal.simek@xilinx.com>

Thanks,
Michal


  reply	other threads:[~2021-08-06  7:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-29  7:19 Yang Yingliang
2021-08-06  7:45 ` Michal Simek [this message]
2021-08-11 13:09 ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b3b4a3a7-17b1-4317-143c-925785b8c687@xilinx.com \
    --to=michal.simek@xilinx.com \
    --cc=lakshmi.sai.krishna.potthuri@xilinx.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yangyingliang@huawei.com \
    --subject='Re: [PATCH] pinctrl: zynqmp: Drop pinctrl_unregister for devm_ registered device' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).