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 8719E3C6A4E for ; Tue, 17 Mar 2026 13:05:29 +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=1773752729; cv=none; b=DPFVbVeVm5FtliIB5DdsXqhQh7damDhP8+Auqd9lxfFPb6MtvEoNCU/pNJ8FCYc7bTFFSzxmtz7EENueetuZ7bDW+NfWIer28j8Uad5KSAyhtAXhUTiRM5YPVtEDUwfUCc2mvWfseUs/WylCwc21aoXp1tjJIwPUq/k+hMVUpW0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773752729; c=relaxed/simple; bh=9uVRfxv4aaCl0O72z/1PwM942VdcMNf1WgzyKLAy8Ko=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=BgTMW/7Q4kV1/lmOrjA67hsTaKjHA7FAJS+FlSi5JBY8aFGVBYZYfMEMvFnuy3/TY6SaNQb5gN4uzVLsvWfoKtzLj2fdBlLak8iF69kDcvS+2GgdRZQjhF2D5BiKMfUux8sbFtKa4/jEoEzbKnsdtsnteeaG01br2oS3DUU7vJ8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Zlrszs91; 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="Zlrszs91" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F13B3C4CEF7; Tue, 17 Mar 2026 13:05:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1773752729; bh=9uVRfxv4aaCl0O72z/1PwM942VdcMNf1WgzyKLAy8Ko=; h=Subject:To:Cc:From:Date:From; b=Zlrszs91L6aPR+Mvm4XCemjnWYqP6kA1Oby44WJc9fKQQOkCwJxire2nlIZ+G0Bg2 VTGWHgyduqvtZeDxCez8f/+fe4LhZwcbYWtmyi1FqjUu2kpnlv77ZmoJ5N2GkYNb/h njS/Ito8pG0zx4Nbd1LcrJvUcvAOPYtSqS4vIOmw= Subject: FAILED: patch "[PATCH] iio: light: bh1780: fix PM runtime leak on error path" failed to apply to 5.10-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: <2026031708-darkened-unrelated-6f05@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.10-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.10.y git checkout FETCH_HEAD git cherry-pick -x dd72e6c3cdea05cad24e99710939086f7a113fb5 # git commit -s git send-email --to '' --in-reply-to '2026031708-darkened-unrelated-6f05@gregkh' --subject-prefix 'PATCH 5.10.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;