Re: linux-next: build failure after merge of the tty tree

From: Nathan Chancellor

Date: Thu Jul 16 2026 - 00:03:59 EST


On Tue, Jul 14, 2026 at 11:26:02AM +0100, Mark Brown wrote:
> On Tue, Jul 14, 2026 at 08:45:54AM +0200, Greg KH wrote:
> > On Tue, Jul 14, 2026 at 11:36:44AM +0530, Praveen Talari wrote:
>
> > > I don't see these errors in my local build. Is there any specific way to
> > > build to see these errors?
>
> > Nope, I can't duplicate this either on my side just by building this
> > branch. Is this coming from a change somewhere else that modifies
> > PM_RUNTIME_ACQUIRE_IF_ENABLED()?
>
> It's something clang reports.

Right, this change is broken, as the cleanup function will be called
with an uninitialized pointer on any of the 'goto error' paths before
the PM_RUNTIME_ACQUIRE_IF_ENABLED(). This goes against the documentation
in include/linux/cleanup.h:

Lastly, given that the benefit of cleanup helpers is removal of
“goto”, and that the “goto” statement can jump between scopes, the
expectation is that usage of “goto” and cleanup helpers is never mixed
in the same function. I.e. for a given routine, convert all resources
that need a “goto” cleanup to scope-based cleanup, or convert none of
them.

--
Cheers,
Nathan