public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tzung-Bi Shih <tzungbi@kernel.org>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: chrome-platform@lists.linux.dev, kernel-janitors@vger.kernel.org,
	"Benson Leung" <bleung@chromium.org>,
	"Günter Röck" <groeck@chromium.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] platform/chrome: cros_ec_i2c: Less function calls in cros_ec_cmd_xfer_i2c() after error detection
Date: Wed, 3 Jan 2024 11:34:12 +0800	[thread overview]
Message-ID: <ZZTVtOumDlR4iZPa@google.com> (raw)
In-Reply-To: <5db36d2b-afe0-4027-b22e-ded163a409be@web.de>

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.

  reply	other threads:[~2024-01-03  3:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-28  7:56 [PATCH] platform/chrome: cros_ec_i2c: Less function calls in cros_ec_cmd_xfer_i2c() after error detection Markus Elfring
2024-01-03  3:34 ` Tzung-Bi Shih [this message]
2024-01-03  7:56   ` Markus Elfring

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=ZZTVtOumDlR4iZPa@google.com \
    --to=tzungbi@kernel.org \
    --cc=Markus.Elfring@web.de \
    --cc=bleung@chromium.org \
    --cc=chrome-platform@lists.linux.dev \
    --cc=groeck@chromium.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox