linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Lin Yujun <linyujun809@huawei.com>
Cc: christophe.jaillet@wanadoo.fr, paulburton@kernel.org,
	linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] MIPS: SGI-IP27: Fix platform-device leak in bridge_platform_create()
Date: Mon, 19 Sep 2022 16:48:31 +0200	[thread overview]
Message-ID: <20220919144831.GC7674@alpha.franken.de> (raw)
In-Reply-To: <20220914032917.97203-1-linyujun809@huawei.com>

On Wed, Sep 14, 2022 at 11:29:17AM +0800, Lin Yujun wrote:
> In error case in bridge_platform_create after calling
> platform_device_add()/platform_device_add_data()/
> platform_device_add_resources(), release the failed
> 'pdev' or it will be leak, call platform_device_put()
> to fix this problem.
> 
> Besides, 'pdev' is divided into 'pdev_wd' and 'pdev_bd',
> use platform_device_unregister() to release sgi_w1
> resources when xtalk-bridge registration fails.
> 
> Fixes: 5dc76a96e95a ("MIPS: PCI: use information from 1-wire PROM for IOC3 detection")
> Signed-off-by: Lin Yujun <linyujun809@huawei.com>
> ---
>  arch/mips/sgi-ip27/ip27-xtalk.c | 70 +++++++++++++++++++++++----------
>  1 file changed, 50 insertions(+), 20 deletions(-)

applied to mips-next.

Thomas.

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

      reply	other threads:[~2022-09-19 14:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-14  3:29 [PATCH -next] MIPS: SGI-IP27: Fix platform-device leak in bridge_platform_create() Lin Yujun
2022-09-19 14:48 ` 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=20220919144831.GC7674@alpha.franken.de \
    --to=tsbogend@alpha.franken.de \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linyujun809@huawei.com \
    --cc=paulburton@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).