mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chris Simpson <chris@nilk.net>
To: Myeonghun Pak <mhun512@gmail.com>
Cc: Hans de Goede <hansg@kernel.org>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org, Ijae Kim <ae878000@gmail.com>,
	Daniel Scally <dan.scally@ideasonboard.com>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>
Subject: Re: [PATCH] media: i2c: dw9719: power down on detection errors
Date: Sat, 17 Oct 2026 15:40:46 -0600	[thread overview]
Message-ID: <02feb114-960b-46e4-a126-9b8659fc4394@nilk.net> (raw)
In-Reply-To: <20260913041828.28430-1-mhun512@gmail.com>

On Sun, 13 Sep 2026 00:18:28 -0400, Myeonghun Pak wrote:
> Moving chip detection into dw9719_power_up() introduced direct returns
> after the regulator has been enabled. An INFO register read failure or
> an unrecognized ID bypasses the power-down path, while probe only
> cleans up the media entity and controls after a power-up error.

I found the same leak independently while adding DW9800W support for
the Surface Pro 9, and wrote the same change.

I tested both error paths on a Surface Pro 9 (DW9800W, ACPI, a 7.2.11
distro kernel with the linux-surface patches), forcing them with a
test-only hook: an unknown INFO id, and a failed INFO read. Without your
patch, each failed probe hit the WARN_ON(regulator->enable_count) in
_regulator_put(), reported as regulator_put() because it is inlined
there, and the (dummy) supply's num_users stayed one higher. With your
patch, neither happened. An equivalent change in my tree also runs fine
through the normal path, including runtime and system suspend.

Reviewed-by: Chris Simpson <chris@nilk.net>
Tested-by: Chris Simpson <chris@nilk.net>

The patch still applies cleanly to the media-committers next branch.

Thanks,
Chris

Made with AI assistance. Written by Claude Opus 5.5 (drafting), with
review by Claude Fable 5.1 and testing by Claude Opus 5.5, under the
direction of Chris Simpson <chris@nilk.net>, who reviewed and approved
it.

      reply	other threads:[~2026-10-17 21:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-13  4:18 Myeonghun Pak
2026-10-17 21:40 ` Chris Simpson [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=02feb114-960b-46e4-a126-9b8659fc4394@nilk.net \
    --to=chris@nilk.net \
    --cc=ae878000@gmail.com \
    --cc=dan.scally@ideasonboard.com \
    --cc=hansg@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=mhun512@gmail.com \
    --cc=sakari.ailus@linux.intel.com \
    --cc=stable@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

all inboxes | Powered by JetHome®