public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Raffael Raiel Trindade <raffaelraiel@usp.br>
Cc: jic23@kernel.org, dlechner@baylibre.com, nuno.sa@analog.com,
	andy@kernel.org, Kim Carvalho <kim.ca@usp.br>,
	linux-iio@vger.kernel.org
Subject: Re: [PATCH] iio: light: vcnl4000: use lock guard()
Date: Fri, 17 Apr 2026 11:19:46 +0300	[thread overview]
Message-ID: <aeHtInsmJeapbJyo@ashevche-desk.local> (raw)
In-Reply-To: <20260416211651.9625-1-raffaelraiel@usp.br>

On Thu, Apr 16, 2026 at 06:16:48PM -0300, Raffael Raiel Trindade wrote:

> Use guard() for handling mutex lock instead of manually locking and
> unlocking. Remove gotos in error handling logic. This prevents forgotten
> locks on early exits.

...

>  	ret = i2c_smbus_write_word_data(data->client, VCNL4200_AL_CONF, ret);
>  
> -out:
> -	mutex_unlock(&data->vcnl4000_lock);
> -
>  	return ret;

It's now

	return i2c_smbus_...;

Ditto for other similar cases below.

-- 
With Best Regards,
Andy Shevchenko



      reply	other threads:[~2026-04-17  8:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-16 21:16 [PATCH] iio: light: vcnl4000: use lock guard() Raffael Raiel Trindade
2026-04-17  8:19 ` Andy Shevchenko [this message]

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=aeHtInsmJeapbJyo@ashevche-desk.local \
    --to=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=kim.ca@usp.br \
    --cc=linux-iio@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=raffaelraiel@usp.br \
    /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