From mboxrd@z Thu Jan 1 00:00:00 1970 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 90D103C1413 for ; Tue, 17 Mar 2026 13:05:21 +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=1773752721; cv=none; b=gFvk2SvfoMl1wCI4xpvvRUK8U4wGunMeRJjpZ8afoPF2yMlFJdytiHVMALaRBqr5t2lcqWLYeq4nWG+UVKWVES/1yLBQJ/q/0ejab3mZNoC/r9u35RzIAI3zdIyu0BQjosFOJw8581VELRVnssS10NlrGr18GySu5v0vPg32Qsw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773752721; c=relaxed/simple; bh=Bfb2fx3Uozd7tnrXRGVGBTdaxwS3nqQm23BPnO1gT9I=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=sr6VkCkwcmO7hYBH5RLYs3F1StDas8Y44rE9S8G9J9A3pYbZWWJECWzpeg25PGOPCJCMaJ7CIhWGHD+zDoyy9VtBCwTxFnBpeCgQMjbTCD9qEjb02WZiWmjKpCY05FVPaxhZ+cGeXPR1V7CaXIXeKLU7aNIoYZsWZ/TlHNtvunw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=gy0qjc+Y; 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="gy0qjc+Y" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CAF20C4CEF7; Tue, 17 Mar 2026 13:05:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1773752721; bh=Bfb2fx3Uozd7tnrXRGVGBTdaxwS3nqQm23BPnO1gT9I=; h=Subject:To:Cc:From:Date:From; b=gy0qjc+YqJk81RmMsAYVk7Ofi3Iw8gizPOgVYupgZla7yrVPC7nka4gejFwQAkwJW O7l/OF90je8wEp9Fg+T7QoTPumTdvMg/sh8DeNaDi1inBY/ivAirrUgE960woz0Mdv vn5bSMENs8UZ5zalNeWl+6HVKvRZGbFYs5g7Bl0A= Subject: FAILED: patch "[PATCH] iio: light: bh1780: fix PM runtime leak on error path" failed to apply to 6.1-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:07 +0100 Message-ID: <2026031707-pull-leverage-a222@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 6.1-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-6.1.y git checkout FETCH_HEAD git cherry-pick -x dd72e6c3cdea05cad24e99710939086f7a113fb5 # git commit -s git send-email --to '' --in-reply-to '2026031707-pull-leverage-a222@gregkh' --subject-prefix 'PATCH 6.1.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;