[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z4lMxdFWrZorX0h2@google.com>
Date: Thu, 16 Jan 2025 10:15:33 -0800
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc: devnull+fnkl.kernel.gmail.com@...nel.org, alyssa@...enzweig.io,
asahi@...ts.linux.dev, conor+dt@...nel.org,
devicetree@...r.kernel.org, fnkl.kernel@...il.com, j@...nau.net,
krzk+dt@...nel.org, linux-arm-kernel@...ts.infradead.org,
linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
marcan@...can.st, neal@...pa.dev, robh@...nel.org,
rydberg@...math.org, sven@...npeter.dev
Subject: Re: [PATCH v4 2/4] input: apple_z2: Add a driver for Apple Z2
touchscreens
On Thu, Jan 16, 2025 at 07:03:13PM +0100, Christophe JAILLET wrote:
> Le 15/01/2025 à 23:46, Sasha Finkelstein via B4 Relay a écrit :
>
> > +
> > + /* Wait for device reset to finish */
> > + usleep_range(5000, 10000);
> > + error = apple_z2_boot(z2);
> > + if (error)
> > + return error;
> > + return 0;
>
> Nitpick: These 4 lines could be just:
> return apple_z2_boot(z2);
The current form is actually my preference - if a function has multiple
points of failure then do
error = action(...);
if (error)
return error;
everywhere with final "return 0;" at the end. This way it is easier to
rearrange code if needed.
Thanks.
--
Dmitry
Powered by blists - more mailing lists