From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6D5CC30AAD8 for ; Fri, 29 May 2026 10:45:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780051507; cv=none; b=XfQjuzq9BUHSjXqsmbFjtg4dejszZ4cv18hG7pGSVskjUiuJircDJF/ufcsVJsWWqBmA/ou+sp02uhqSYVFTEwRS6id9xNOlNxOb5PWMPm1lMDyR0CYFo4P1HESOnhACQDE7bjHnqiuynGhTl0IZCbOCzk1i8YJ63CpN30BcjGA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780051507; c=relaxed/simple; bh=5XrUAZCKALQ/K4rRj3UilL1pQnTEhw7pp2RKetgAPLA=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=hcC6NPjLw2iJT3RSKLK+YF27WCQs1P3KjIdBzPYgJrFRDvtJfYyYI1NaOH2W0yOrKoiGfEUSGyHxT896XJGnEc4J8lUj9zn6s9EhBHhaOUMZhu3fcrnsSWtvBOXVR+ry8mcbE0PM5AVLmVXzZ31Wq7vBsmxuvvPtS+w6HxeF/eo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Z5pfW7j4; arc=none smtp.client-ip=209.85.167.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Z5pfW7j4" Received: by mail-lf1-f45.google.com with SMTP id 2adb3069b0e04-5aa4a98cf0aso368457e87.0 for ; Fri, 29 May 2026 03:45:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1780051504; x=1780656304; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=f285livwfibfPOpeihvBsAwaP3ma2vuk5i0MORNhkXI=; b=Z5pfW7j4eDTLaTpwVN8iQ2P19de4O550ngFjJdwqI60Vntfa6OrTIPuz/4n66XWkr8 EqDJbQ5q88+hX90fTRnyJKw+cCWgpL/v0NmQio1aRNvjkcgEnrrcMEI0o9At2lSuDsvB 8llsZLsShq30TpTiSyv1wEozTgWrvsi0NjiwAVHLgXPACzQ68ZTZfOHs9ixT1VQtDHsA 8+EWRyW37ZlCOSYOkkroiQR+no10/UPY1+E2mSdlxeIwkPOz0ahcJgZaB9/Q4kSq8Ji/ 9UlhBC3lNZBN9049MuxpjUjfH+/ZD8E23eDFxP2AjvZuq43swwM6HCnzuPhGTWhSARbf LhBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780051504; x=1780656304; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=f285livwfibfPOpeihvBsAwaP3ma2vuk5i0MORNhkXI=; b=QWTMC7KrfOjrTdTnvNt98YwnWWbUZwihqZbFWtIyDxDOaCAPibAjQRbApLI7WV1caS EpNts7dyAQleiaSDSw9732AfOtlgwVKnkh0nK44FiJDizn1SbBmTWPKqdq8rqgmA2ss/ PXcisNg65+mNsD4eGcwUHZbWmgJQBOWJqocM5ZA6SDwoXi4iMAKJnPr9FPM6+5BOlFzZ bQi+/9ZHaBcRJPXSa2mcSlYpx65cSJQXcckiUPLYdMbwHkVaGO2lTz2HHEbx/cVJOwMt PKxMUatJmDKI4LuJ1rMUvlu328cvRnYlk9tfXXN7qDhOgSrsGkmYpxdna00TBLTbc2tl Rxig== X-Forwarded-Encrypted: i=1; AFNElJ9r7EvmqDP+ztDB0bfJENBKoGYObp/PACQG6UdQqIJVSsYpignLoJhWPjgjnWl3GGJxplCzirVtVY+NkdU=@vger.kernel.org X-Gm-Message-State: AOJu0Yy8KK+0gDqbZso0eMeTWykfjBYxG78F9vkqjnFU0jBr8AsuV//v qBiNcD6MeoiNJAqmPU4TrKtvOO9VVOKnRb/QWMFBvhlkEG6jayLjc9/p5LtzdKO5 X-Gm-Gg: Acq92OFsYugs0/Bv26v0Jz8zLpvOyBKz4qEuomwuI+hhNGfWE8wer86tWDk8g/UMI69 sRBb4uSa8V6bES9Um4K5F8vITT9oF2mZG1KTIvdYDEidCCMX+HSuBdb16LciDLoks3uqNarkm9g XCJ3/HWy5dK5yLPWn2gAs506ChtjuBhQksR+HI96QqTxQrgJ9jh96mQi7LpE8zCsZtwUz9ywT10 QP43Y7WqEMw7DhqizLKe2Okk6IpnKFiH2DEJwPmWAXPl3HomwZIk8xUvlO1iA/fVxOp3ig3ojQ4 LvgcY8AvTdiAeiGvXmiFLwB8/tX/1MdVnl5ahwGIBvWLRTwEVS+o4K5AY3XXnqDfneBkYObOi/k jwQXLWwt8dTz4LhwavRbndDvyXoYG4iLvHfeVYP3vmQ9Qbnw7IXJ4eTJQ8oAmBElBCK2Es41Za5 biOpxhe7PFrfYBmTYoiOGaAlMNAwpbah1FpOKUQ0VFxx/BdforJBm0REGXNui1buMfog== X-Received: by 2002:a05:6512:3a8a:b0:5a8:847a:dee2 with SMTP id 2adb3069b0e04-5aa5949d066mr324254e87.3.1780051504319; Fri, 29 May 2026 03:45:04 -0700 (PDT) Received: from localhost.localdomain ([94.158.61.193]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5aa5b071d25sm205269e87.18.2026.05.29.03.45.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 May 2026 03:45:02 -0700 (PDT) From: Stepan Ionichev To: jic23@kernel.org Cc: dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/4] iio: fix PM-enable leak on probe error path across 4 drivers Date: Fri, 29 May 2026 15:44:52 +0500 Message-Id: X-Mailer: git-send-email 2.33.0.windows.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This series fixes a class of runtime PM enable_count leaks on probe error paths across drivers/iio/. Each affected driver calls pm_runtime_enable() in probe and then a non-devm registration function (typically iio_device_register()). When the registration fails the probe returns directly without calling pm_runtime_disable(); on subsequent probe/rebind the runtime PM tracking complains about an unbalanced enable. The fix is the same in each driver: replace pm_runtime_enable() with devm_pm_runtime_enable() and drop the now-redundant pm_runtime_disable() and pm_runtime_set_suspended() calls in the .remove() callback. The devm action runs after .remove() and handles the teardown. drivers/iio/adc/ti-ads1015.c was posted as a standalone patch earlier: https://lore.kernel.org/all/20260529101011.3030-1-sozdayvek@gmail.com/ A separate follow-up will cover four more drivers (apds9960, mma8452, pa12203001, us5182d) where the same leak exists but the probe error path needs a goto to the existing manual cleanup label rather than a plain return. Stepan Ionichev (4): iio: light: isl29028: use devm_pm_runtime_enable() to fix probe error path iio: light: tsl2583: use devm_pm_runtime_enable() to fix probe error path iio: temperature: mlx90614: use devm_pm_runtime_enable() to fix probe error path iio: accel: bmi088-accel: use devm_pm_runtime_enable() to fix probe error path drivers/iio/accel/bmi088-accel-core.c | 6 +++--- drivers/iio/light/isl29028.c | 7 +++---- drivers/iio/light/tsl2583.c | 6 +++--- drivers/iio/temperature/mlx90614.c | 6 +++--- 4 files changed, 12 insertions(+), 13 deletions(-) base-commit: 7cb1c5b32a2bfde961fff8d5204526b609bcb30a -- 2.43.0