public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
From: Antoniu Miclaus <antoniu.miclaus@analog.com>
To: "Linus Walleij" <linusw@kernel.org>,
	"Jonathan Cameron" <jic23@kernel.org>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Antoniu Miclaus <antoniu.miclaus@analog.com>
Subject: [PATCH v4 0/2] iio: gyro: mpu3050: fix pm_runtime error handling
Date: Mon, 16 Feb 2026 11:57:54 +0200	[thread overview]
Message-ID: <cover.1771233915.git.antoniu.miclaus@analog.com> (raw)

Fix pm_runtime error handling across the mpu3050 driver. The existing
code uses pm_runtime_get_sync() without checking return values, allowing
operations to proceed even when the device fails to resume.

Replace pm_runtime_get_sync() with pm_runtime_resume_and_get() and
propagate errors appropriately. Unlike pm_runtime_get_sync(), the usage
count is not incremented on error.

Changes in v4:
- Reword commit messages to correctly attribute the unchecked return
  value to the caller rather than pm_runtime_get_sync() itself
- Simplify preenable by collapsing the trailing return statements

Antoniu Miclaus (2):
  iio: gyro: mpu3050-i2c: fix pm_runtime error handling
  iio: gyro: mpu3050-core: fix pm_runtime error handling

 drivers/iio/gyro/mpu3050-core.c | 18 +++++++++++++-----
 drivers/iio/gyro/mpu3050-i2c.c  |  3 +--
 2 files changed, 14 insertions(+), 7 deletions(-)

-- 
2.43.0


             reply	other threads:[~2026-02-16  9:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-16  9:57 Antoniu Miclaus [this message]
2026-02-16  9:57 ` [PATCH v4 1/2] iio: gyro: mpu3050-i2c: fix pm_runtime error handling Antoniu Miclaus
2026-02-16  9:57 ` [PATCH v4 2/2] iio: gyro: mpu3050-core: " Antoniu Miclaus
2026-02-20 10:59 ` [PATCH v4 0/2] iio: gyro: mpu3050: " Jonathan Cameron

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=cover.1771233915.git.antoniu.miclaus@analog.com \
    --to=antoniu.miclaus@analog.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    /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