[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZZTVtOumDlR4iZPa@google.com>
Date: Wed, 3 Jan 2024 11:34:12 +0800
From: Tzung-Bi Shih <tzungbi@...nel.org>
To: Markus Elfring <Markus.Elfring@....de>
Cc: chrome-platform@...ts.linux.dev, kernel-janitors@...r.kernel.org,
Benson Leung <bleung@...omium.org>,
Günter Röck <groeck@...omium.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] platform/chrome: cros_ec_i2c: Less function calls in
cros_ec_cmd_xfer_i2c() after error detection
On Thu, Dec 28, 2023 at 08:56:38AM +0100, Markus Elfring wrote:
> The kfree() function was called in up to two cases by
> the cros_ec_cmd_xfer_i2c() function during error handling
> even if the passed variable contained a null pointer.
> This issue was detected by using the Coccinelle software.
>
> * Adjust jump targets.
>
> * Delete two initialisations which became unnecessary
> with this refactoring.
The patch saves few instructions but makes the code less readable a bit. I
would prefer to leave the code as is or wait for other reviewers' input.
Powered by blists - more mailing lists