Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 65DD43C9EF0 for ; Tue, 17 Mar 2026 13:05:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773752733; cv=none; b=tPfWuRuraw5aDABytMTYrjjG27xxNSatIbs5wc9JKW9z5bKkvSXrYEVs/QVdfirocTtOAPho0dX2DcICW8xl6RofUcLE3CrSqJCveB5Z9FGFREEtVQHKTOmmJGXmdfURTxmZQ/tzQfTbH7G/JaMgHlRCry/Odz0cgBB3XFs2sIY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773752733; c=relaxed/simple; bh=6vEyqfQbtVzCzgaM0QHArKmxsjsZmfoM2eBV6G0wpxw=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=sWjVyDoCFl2EabimDJOZhGvQTgKK5RKbUcZijHcgyZzpH+EWJacuFOI8iG3aaNUFq1wb8VBafLn1Sx408wRWU9rbi9zbTd35QG6z3y4tNOIYzcKHJymSHjc7vuKWLzyb6bR1+3wmu8zulWPZQfRwV0Vnms1t8TXWXvt0VO0nsU8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=pkLyJ3B0; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="pkLyJ3B0" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 813DCC2BC86; Tue, 17 Mar 2026 13:05:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1773752733; bh=6vEyqfQbtVzCzgaM0QHArKmxsjsZmfoM2eBV6G0wpxw=; h=Subject:To:Cc:From:Date:From; b=pkLyJ3B0aFFqU/TDFN2wVzM71Fe65OwIn+tNIYdpcg3dFbex7JIcgCc+a5cjOJB6X aoCOpKnrv6o2JdOGDv3bEe7qoZtL7OGq/UDLfYcNRcMxuGJv03QKcnvo8/4WAzjHlK knzZYmYpEELpndSUt2AI5SeJ6dHTOveU90ho5ke0= Subject: FAILED: patch "[PATCH] iio: light: bh1780: fix PM runtime leak on error path" failed to apply to 5.15-stable tree To: antoniu.miclaus@analog.com,Jonathan.Cameron@huawei.com,Stable@vger.kernel.org,linusw@kernel.org Cc: From: Date: Tue, 17 Mar 2026 14:05:08 +0100 Message-ID: <2026031707-rehab-trio-c127@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 5.15-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y git checkout FETCH_HEAD git cherry-pick -x dd72e6c3cdea05cad24e99710939086f7a113fb5 # git commit -s git send-email --to '' --in-reply-to '2026031707-rehab-trio-c127@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ From dd72e6c3cdea05cad24e99710939086f7a113fb5 Mon Sep 17 00:00:00 2001 From: Antoniu Miclaus Date: Fri, 30 Jan 2026 13:30:20 +0200 Subject: [PATCH] iio: light: bh1780: fix PM runtime leak on error path Move pm_runtime_put_autosuspend() before the error check to ensure the PM runtime reference count is always decremented after pm_runtime_get_sync(), regardless of whether the read operation succeeds or fails. Fixes: 1f0477f18306 ("iio: light: new driver for the ROHM BH1780") Signed-off-by: Antoniu Miclaus Reviewed-by: Linus Walleij Cc: Signed-off-by: Jonathan Cameron diff --git a/drivers/iio/light/bh1780.c b/drivers/iio/light/bh1780.c index 5d3c6d5276ba..a740d1f992a8 100644 --- a/drivers/iio/light/bh1780.c +++ b/drivers/iio/light/bh1780.c @@ -109,9 +109,9 @@ static int bh1780_read_raw(struct iio_dev *indio_dev, case IIO_LIGHT: pm_runtime_get_sync(&bh1780->client->dev); value = bh1780_read_word(bh1780, BH1780_REG_DLOW); + pm_runtime_put_autosuspend(&bh1780->client->dev); if (value < 0) return value; - pm_runtime_put_autosuspend(&bh1780->client->dev); *val = value; return IIO_VAL_INT;