summaryrefslogtreecommitdiff
path: root/scripts/stackusage
diff options
context:
space:
mode:
authorDavid Carlier <devnexen@gmail.com>2026-04-14 13:30:06 +0100
committerJonathan Cameron <jic23@kernel.org>2026-04-28 16:36:09 +0100
commit0d42e2c0bd6ceb89e44c6e065f9bdf9b1df3ef0c (patch)
treeaf47b9af0f077153667ef0112d4e0035c37fef5b /scripts/stackusage
parent7e5c0f97c66ad538b87c04a640573371fb434b4f (diff)
iio: adc: npcm: fix unbalanced clk_disable_unprepare()
The driver acquired the ADC clock with devm_clk_get() and read its rate, but never called clk_prepare_enable(). The probe error path and npcm_adc_remove() both called clk_disable_unprepare() unconditionally, causing the clk framework's enable/prepare counts to underflow on probe failure or module unbind. The issue went unnoticed because NPCM BMC firmware leaves the ADC clock enabled at boot, so the driver happened to work in practice. Switch to devm_clk_get_enabled() so the clock is properly enabled during probe and automatically released by the device-managed cleanup, and drop the now-redundant clk_disable_unprepare() from both the probe error path and remove(). While at it, drop the duplicate error message on devm_request_irq() failure since the IRQ core already logs it. Fixes: 9bf85fbc9d8f ("iio: adc: add NPCM ADC driver") Signed-off-by: David Carlier <devnexen@gmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'scripts/stackusage')
0 files changed, 0 insertions, 0 deletions