From: Esben Haabendal <esben@geanix.com>
To: <sashiko-reviews@lists.linux.dev>
Cc: <devicetree@vger.kernel.org>, <robh@kernel.org>, <conor+dt@kernel.org>
Subject: Re: [PATCH v8 9/9] iio: accel: mma8452: Support interrupt sharing
Date: Tue, 08 Sep 2026 11:15:34 +0200 [thread overview]
Message-ID: <871pb485op.fsf@geanix.com> (raw)
In-Reply-To: <87mrtt8357.fsf@geanix.com>
"Esben Haabendal" <esben@geanix.com> writes:
> <sashiko-bot@kernel.org> writes:
>>> +
>>> + ret = mma8452_standby(data);
>>> + if (ret < 0) {
>>> + dev_err(dev, "transition to STANDBY mode failed\n");
>>> + ret = -EAGAIN;
>>> + goto out_restore_ctrl_reg4;
>>> }
>>
>> [Severity: Low]
>> Does this mix goto-based error handling with guard() cleanup in the same
>> function?
>>
>> The cleanup subsystem guidelines state that mixing goto and scope-based cleanup
>> creates confusing ownership semantics.
>>
>> [ ... ]
>
> I will try to convert to scope-based cleanup to avoid this, and see if I
> can create something nice with that approach.
I hope it is okay that I delay doing this for the next series, where I
will introduce scope-based cleanup for runtime PM also.
While it is best not to mix goto and scope-based cleanup in the same
functions, in this particular case, it is working as expected for now.
The only scope-based cleanup is the guard which is first in the
function, and is supposed to be run after all the goto-based error
handling, which is exactly what will happen.
But I will try and rework it to use scope-based cleanup only as part of
the next series also.
/Esben
next prev parent reply other threads:[~2026-09-08 9:15 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-07 14:50 [PATCH v8 0/9] io: accel: mma8452: Allow open drain interrupt pin configuration Esben Haabendal
2026-09-07 14:50 ` [PATCH v8 1/9] dt-bindings: iio: accel: mma8452: Add drive-open-drain Esben Haabendal
2026-09-07 14:50 ` [PATCH v8 2/9] iio: accel: mma8452: Fix use-after-free bug in error error path Esben Haabendal
2026-09-07 15:04 ` sashiko-bot
2026-09-07 15:08 ` Esben Haabendal
2026-09-07 14:50 ` [PATCH v8 3/9] iio: accel: mma8452: Optimize struct mma8452_data member orders Esben Haabendal
2026-09-07 14:50 ` [PATCH v8 4/9] iio: accel: mma8452: Only apply trigger type when not set by firmware Esben Haabendal
2026-09-07 15:01 ` sashiko-bot
2026-09-07 14:51 ` [PATCH v8 5/9] iio: accel: mma8452: Fix unintended comment indent Esben Haabendal
2026-09-07 15:04 ` Joshua Crofts
2026-09-07 14:51 ` [PATCH v8 6/9] iio: accel: mma8452: Add comment block for struct mma8452_data Esben Haabendal
2026-09-07 14:58 ` sashiko-bot
2026-09-07 15:07 ` Esben Haabendal
2026-09-07 15:14 ` Joshua Crofts
2026-09-07 16:28 ` Esben Haabendal
2026-09-08 10:36 ` Andy Shevchenko
2026-09-07 14:51 ` [PATCH v8 7/9] iio: accel: mma8452: Allow open drain interrupt pin configuration Esben Haabendal
2026-09-07 15:05 ` sashiko-bot
2026-09-07 15:09 ` Esben Haabendal
2026-09-07 14:51 ` [PATCH v8 8/9] iio: accel: mma8452: Use proper error code when missing device model Esben Haabendal
2026-09-07 14:51 ` [PATCH v8 9/9] iio: accel: mma8452: Support interrupt sharing Esben Haabendal
2026-09-07 15:08 ` sashiko-bot
2026-09-07 15:58 ` Esben Haabendal
2026-09-08 9:15 ` Esben Haabendal [this message]
2026-09-07 15:10 ` Joshua Crofts
2026-09-07 16:36 ` Esben Haabendal
2026-09-09 9:21 ` Joshua Crofts
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=871pb485op.fsf@geanix.com \
--to=esben@geanix.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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.