[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c6ef8015-26fc-61dc-14a6-e16c07b390c8@samsung.com>
Date: Wed, 3 Jun 2020 11:24:22 +0200
From: Sylwester Nawrocki <s.nawrocki@...sung.com>
To: Krzysztof Kozlowski <krzk@...nel.org>
Cc: georgi.djakov@...aro.org, cw00.choi@...sung.com,
a.swigon@...sung.com, myungjoo.ham@...sung.com,
inki.dae@...sung.com, sw0312.kim@...sung.com,
b.zolnierkie@...sung.com, m.szyprowski@...sung.com,
linux-kernel@...r.kernel.org, linux-samsung-soc@...r.kernel.org,
dri-devel@...ts.freedesktop.org,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [RFC PATCH v5 2/6] interconnect: Add generic interconnect
driver for Exynos SoCs
On 02.06.2020 10:21, Krzysztof Kozlowski wrote:
>> +static struct icc_node *exynos_icc_get_parent(struct device_node *np)
>> +{
>> + struct of_phandle_args args;
>> + int num, ret;
>> +
>> + num = of_count_phandle_with_args(np, "samsung,interconnect-parent",
>> + "#interconnect-cells");
>> + if (num != 1)
>> + return NULL; /* parent nodes are optional */
>> +
>> + ret = of_parse_phandle_with_args(np, "samsung,interconnect-parent",
>> + "#interconnect-cells", 0, &args);
>> + if (ret < 0)
>> + return ERR_PTR(ret);
>> +
>> + of_node_put(args.np);
>> +
>> + return of_icc_get_from_provider(&args);
> I think of_node_put() should happen after of_icc_get_from_provider().
Indeed, thanks, I will amend that. It seems the node reference count decrementing
is often not done properly after existing calls to of_parse_phandle_with_args().
--
Thanks,
Sylwester
Powered by blists - more mailing lists