[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <176bcb51-f343-47a8-a5d9-14e76a7a6139@linaro.org>
Date: Tue, 20 Aug 2024 11:29:08 +0200
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: Jonathan Cameron <Jonathan.Cameron@...wei.com>
Cc: Ulf Hansson <ulf.hansson@...aro.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Daniel Lezcano <daniel.lezcano@...aro.org>, Anup Patel
<anup@...infault.org>, Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>, Albert Ou <aou@...s.berkeley.edu>,
linux-pm@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, linux-riscv@...ts.infradead.org
Subject: Re: [PATCH 2/4] cpuidle: riscv-sbi: Use scoped device node handling
to simplify error paths
On 19/08/2024 18:13, Jonathan Cameron wrote:
>>
>> /* Parse SBI specific details from state DT nodes */
>> for (i = 1; i < state_count; i++) {
>> @@ -264,10 +262,8 @@ static int sbi_cpuidle_dt_init_states(struct device *dev,
>>
>> pr_debug("sbi-state %#x index %d\n", states[i], i);
>> }
>> - if (i != state_count) {
>> - ret = -ENODEV;
>> - goto fail;
>> - }
>> + if (i != state_count)
>> + return -ENODEV;
>>
>> /* Initialize optional data, used for the hierarchical topology. */
>> ret = sbi_dt_cpu_init_topology(drv, data, state_count, cpu);
> The handling of error ret from here doesn't free the node.
>
> Bug or something subtle I'm missing?
>
> If it's a bug, then fixes tag.
Yeah, indeed it is a fix.
Best regards,
Krzysztof
Powered by blists - more mailing lists