All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shawn Lin <shawn.lin@rock-chips.com>
To: Wei Yongjun <weiyj.lk@gmail.com>,
	Shawn Lin <shawn.lin@rock-chips.com>,
	Wenrui Li <wenrui.li@rock-chips.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Heiko Stuebner <heiko@sntech.de>
Cc: linux-pci@vger.kernel.org, shawn.lin@rock-chips.com,
	Wei Yongjun <weiyongjun1@huawei.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org
Subject: Re: [PATCH -next] PCI: rockchip: Add missing of_node_put() in rockchip_pcie_init_irq_domain()
Date: Tue, 18 Oct 2016 08:50:28 +0800	[thread overview]
Message-ID: <87c39739-c9d0-b307-5256-591ef7324ffa@rock-chips.com> (raw)
In-Reply-To: <1476716242-31684-1-git-send-email-weiyj.lk@gmail.com>

5ZyoIDIwMTYvMTAvMTcgMjI6NTcsIFdlaSBZb25nanVuIOWGmemBkzoKPiBGcm9tOiBXZWkgWW9u
Z2p1biA8d2VpeW9uZ2p1bjFAaHVhd2VpLmNvbT4KPgo+IFRoaXMgbm9kZSBwb2ludGVyIGlzIHJl
dHVybmVkIGJ5IG9mX2dldF9uZXh0X2NoaWxkKCkgd2l0aCByZWZjb3VudAo+IGluY3JlbWVudGVk
IGluIHRoaXMgZnVuY3Rpb24uIG9mX25vZGVfcHV0KCkgb24gaXQgYmVmb3JlIGV4aXR0aW5nCj4g
dGhpcyBmdW5jdGlvbiBvbiBlcnJvci4KPgo+IFRoaXMgaXMgZGV0ZWN0ZWQgYnkgQ29jY2luZWxs
ZSBzZW1hbnRpYyBwYXRjaC4KClRoYW5rcyBmb3IgZml4aW5nIHRoaXMuCgpBY2tlZC1ieTogU2hh
d24gTGluIDxzaGF3bi5saW5Acm9jay1jaGlwcy5jb20+Cgo+Cj4gU2lnbmVkLW9mZi1ieTogV2Vp
IFlvbmdqdW4gPHdlaXlvbmdqdW4xQGh1YXdlaS5jb20+Cj4gLS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hd24gTGluCgoKX19fX19fX19fX19fX19fX19fX19fX19fX19f
X19fX19fX19fX19fX19fX19fX18KbGludXgtYXJtLWtlcm5lbCBtYWlsaW5nIGxpc3QKbGludXgt
YXJtLWtlcm5lbEBsaXN0cy5pbmZyYWRlYWQub3JnCmh0dHA6Ly9saXN0cy5pbmZyYWRlYWQub3Jn
L21haWxtYW4vbGlzdGluZm8vbGludXgtYXJtLWtlcm5lbAo=

WARNING: multiple messages have this Message-ID (diff)
From: Shawn Lin <shawn.lin@rock-chips.com>
To: Wei Yongjun <weiyj.lk@gmail.com>,
	Wenrui Li <wenrui.li@rock-chips.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Heiko Stuebner <heiko@sntech.de>
Cc: shawn.lin@rock-chips.com, Wei Yongjun <weiyongjun1@huawei.com>,
	linux-pci@vger.kernel.org, linux-rockchip@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH -next] PCI: rockchip: Add missing of_node_put() in rockchip_pcie_init_irq_domain()
Date: Tue, 18 Oct 2016 08:50:28 +0800	[thread overview]
Message-ID: <87c39739-c9d0-b307-5256-591ef7324ffa@rock-chips.com> (raw)
In-Reply-To: <1476716242-31684-1-git-send-email-weiyj.lk@gmail.com>

在 2016/10/17 22:57, Wei Yongjun 写道:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> This node pointer is returned by of_get_next_child() with refcount
> incremented in this function. of_node_put() on it before exitting
> this function on error.
>
> This is detected by Coccinelle semantic patch.

Thanks for fixing this.

Acked-by: Shawn Lin <shawn.lin@rock-chips.com>

>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  drivers/pci/host/pcie-rockchip.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/pci/host/pcie-rockchip.c b/drivers/pci/host/pcie-rockchip.c
> index e0b22da..ab88859 100644
> --- a/drivers/pci/host/pcie-rockchip.c
> +++ b/drivers/pci/host/pcie-rockchip.c
> @@ -949,6 +949,7 @@ static int rockchip_pcie_init_irq_domain(struct rockchip_pcie *rockchip)
>  						    &intx_domain_ops, rockchip);
>  	if (!rockchip->irq_domain) {
>  		dev_err(dev, "failed to get a INTx IRQ domain\n");
> +		of_node_put(intc);
>  		return -EINVAL;
>  	}
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


-- 
Best Regards
Shawn Lin

WARNING: multiple messages have this Message-ID (diff)
From: shawn.lin@rock-chips.com (Shawn Lin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH -next] PCI: rockchip: Add missing of_node_put() in rockchip_pcie_init_irq_domain()
Date: Tue, 18 Oct 2016 08:50:28 +0800	[thread overview]
Message-ID: <87c39739-c9d0-b307-5256-591ef7324ffa@rock-chips.com> (raw)
In-Reply-To: <1476716242-31684-1-git-send-email-weiyj.lk@gmail.com>

? 2016/10/17 22:57, Wei Yongjun ??:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> This node pointer is returned by of_get_next_child() with refcount
> incremented in this function. of_node_put() on it before exitting
> this function on error.
>
> This is detected by Coccinelle semantic patch.

Thanks for fixing this.

Acked-by: Shawn Lin <shawn.lin@rock-chips.com>

>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  drivers/pci/host/pcie-rockchip.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/pci/host/pcie-rockchip.c b/drivers/pci/host/pcie-rockchip.c
> index e0b22da..ab88859 100644
> --- a/drivers/pci/host/pcie-rockchip.c
> +++ b/drivers/pci/host/pcie-rockchip.c
> @@ -949,6 +949,7 @@ static int rockchip_pcie_init_irq_domain(struct rockchip_pcie *rockchip)
>  						    &intx_domain_ops, rockchip);
>  	if (!rockchip->irq_domain) {
>  		dev_err(dev, "failed to get a INTx IRQ domain\n");
> +		of_node_put(intc);
>  		return -EINVAL;
>  	}
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


-- 
Best Regards
Shawn Lin

  reply	other threads:[~2016-10-18  0:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-17 14:57 [PATCH -next] PCI: rockchip: Add missing of_node_put() in rockchip_pcie_init_irq_domain() Wei Yongjun
2016-10-17 14:57 ` Wei Yongjun
2016-10-18  0:50 ` Shawn Lin [this message]
2016-10-18  0:50   ` Shawn Lin
2016-10-18  0:50   ` Shawn Lin
2016-11-11 21:45 ` Bjorn Helgaas
2016-11-11 21:45   ` Bjorn Helgaas

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=87c39739-c9d0-b307-5256-591ef7324ffa@rock-chips.com \
    --to=shawn.lin@rock-chips.com \
    --cc=bhelgaas@google.com \
    --cc=heiko@sntech.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=weiyj.lk@gmail.com \
    --cc=weiyongjun1@huawei.com \
    --cc=wenrui.li@rock-chips.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.