public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Qinglang Miao <miaoqinglang@huawei.com>
Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] MIPS: OCTEON: fix error - use 'ret' after remove it
Date: Thu, 24 Sep 2020 10:20:08 +0200	[thread overview]
Message-ID: <20200924082008.GA7822@alpha.franken.de> (raw)
In-Reply-To: <20200924064142.90491-1-miaoqinglang@huawei.com>

On Thu, Sep 24, 2020 at 02:41:42PM +0800, Qinglang Miao wrote:
> Variable ret was removed in commit 0ee69c589ec("MIPS: OCTEON:
> use devm_platform_ioremap_resource") but still being used in
> devm_release_mem_region which is unneeded. So remove this
> line to fix error.
> 
> Fixes: 0ee69c589ec("MIPS: OCTEON: use devm_platform_ioremap_resource")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
> ---
>  arch/mips/cavium-octeon/octeon-usb.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/arch/mips/cavium-octeon/octeon-usb.c b/arch/mips/cavium-octeon/octeon-usb.c
> index 97f6dc31e1b4..987a94cbf3d0 100644
> --- a/arch/mips/cavium-octeon/octeon-usb.c
> +++ b/arch/mips/cavium-octeon/octeon-usb.c
> @@ -534,8 +534,6 @@ static int __init dwc3_octeon_device_init(void)
>  			dev_info(&pdev->dev, "clocks initialized.\n");
>  			mutex_unlock(&dwc3_octeon_clocks_mutex);
>  			devm_iounmap(&pdev->dev, base);
> -			devm_release_mem_region(&pdev->dev, res->start,
> -						resource_size(res));
>  		}
>  	} while (node != NULL);

I've reverted the orginal fix as IMHO the whole change is wrong.
The code maps/unmaps the io region to setup clocks and phy and
releases everything so the real driver can pick it up later.
The devm_release_mem_region is important and since the device
continues to exists, there is not auto-cleanup.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

      parent reply	other threads:[~2020-09-24  8:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-24  6:41 [PATCH -next] MIPS: OCTEON: fix error - use 'ret' after remove it Qinglang Miao
2020-09-24  8:16 ` Sergei Shtylyov
2020-09-24  8:20 ` Thomas Bogendoerfer [this message]

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=20200924082008.GA7822@alpha.franken.de \
    --to=tsbogend@alpha.franken.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=miaoqinglang@huawei.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox