Re: [PATCH v2 3/4] iio: adc: ti-ads7950: switch to using guard() notation

From: David Lechner

Date: Sat Feb 21 2026 - 12:20:54 EST


On 2/19/26 1:51 AM, Andy Shevchenko wrote:
> On Wed, Feb 18, 2026 at 06:29:27PM -0800, Dmitry Torokhov wrote:
>> guard() notation allows early returns when encountering errors, making
>
> guard()()
>
> // strictly speaking
>
>> control flow more obvious. Use it.
>
> I like the change, but...
>
>> Also variables that now only hold error codes (or 0) are renamed to
>> "error" to make their purpose clearer.

Normally I would not give my opinion on this, but since I wrote the driver
originally, I will say please don't rename. I prefer to always use "ret".

>
> ...this does not belong to the patch. If you wish to rename, better doing
> it separately. This, in particular, adds undesired churn in the change making
> it unclear.
>