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 CE71C32ABC4 for ; Thu, 26 Feb 2026 23:52:43 +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=1772149963; cv=none; b=BAAfTEgg/TFeuUbxew3Ql5FWc2L3Po2JiaL7sYKqxx/RWJoqthV7E6VUOWsxOxnuojTSuJ4G+gOZP/wIuSES3T5HACZ3uPeJLxe5CfwRpTUNt9nF2OJ8aXWcvEXhBwU52MwO8Sy6+jP/hzyfEpNTYFrPpgVfPFRcmEkdhTApJ8A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772149963; c=relaxed/simple; bh=Udl1BJEocqnc79JN16exFEBppGFRGlzJ22vz0ql7r5Q=; h=Subject:To:From:Date:Message-ID:MIME-Version:Content-Type; b=hmw3Mxx72j7Q3Mbj5az/G7+0NAmXdDVVs6T9rC05308RRrDE7+NH4fGkOwjMqNcriTrr1oXUDBz7ttOYt5gfm/9cwYGvY4n6RPhnaQHveGcw2cyuVRvpNqGpJ4RbZaRCfRFKCCgVwWF4rhwr+x9Mb1uz1i03T8B7aVyqFfuZ9V4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=R01o5S+D; 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="R01o5S+D" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57D2CC116C6; Thu, 26 Feb 2026 23:52:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1772149963; bh=Udl1BJEocqnc79JN16exFEBppGFRGlzJ22vz0ql7r5Q=; h=Subject:To:From:Date:From; b=R01o5S+DBBcA9GcaKL9LMu6Bbb/tBfA4YeIb28AaRc76Ug8A8w146haXauiu+trjP CQiL7oqjj4djifHZEsFYDPIn5ZJ2UI4njAQ56lpFpWu6TdTi9mS/vrv+yepqtCKm1E /O673twRvu2OZKy4HTEKazfq8zmx47017NG15aYI= Subject: patch "iio: light: bh1780: fix PM runtime leak on error path" added to char-misc-linus To: antoniu.miclaus@analog.com,Jonathan.Cameron@huawei.com,Stable@vger.kernel.org,linusw@kernel.org From: Date: Thu, 26 Feb 2026 15:52:33 -0800 Message-ID: <2026022633-darkened-choice-2044@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 This is a note to let you know that I've just added the patch titled iio: light: bh1780: fix PM runtime leak on error path to my char-misc git tree which can be found at git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git in the char-misc-linus branch. The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.) The patch will hopefully also be merged in Linus's tree for the next -rc kernel release. If you have any questions about this process, please let me know. >From dd72e6c3cdea05cad24e99710939086f7a113fb5 Mon Sep 17 00:00:00 2001 From: Antoniu Miclaus Date: Fri, 30 Jan 2026 13:30:20 +0200 Subject: 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 --- drivers/iio/light/bh1780.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.53.0