From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (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 0E8E63FCB3E; Wed, 3 Jun 2026 06:59:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.153.233 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780469951; cv=none; b=r2bDUa3bRLKjSFI6xCflOjnDKOh3UJwE60MJQgX5AkBc5+SyUcddEDQRDYUaVWWU2TBRw9dn43sW/HuFxMPWzI+NYV1ehPI4fNyBF4oPTl0D53elY0agypf1SVAV+sYm8ItwoMDRBbpt6QwD57OHf51WRtdV0H8+jA2PGJa29Ng= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780469951; c=relaxed/simple; bh=nN9+zsfRheHiwR0iNWCgcstHm1IznAMW4+4pvqexfH0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=futMeRbOltoIdXQsEb9fZPwTvZHpA9C3NRupkjCzm3M4O8BdmBEtMe4smETrbj0tB3wVm8hLJg0ylLtOjNulvFaWkfz1AtSP5NbLjYyXwV/shJSyT2WtoTA6z3fnq0Mf3hZEoP9rQNvNHGPOnUEtZZsuTtuR6tchXVrxHX6SSqA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=NM59DDRw; arc=none smtp.client-ip=68.232.153.233 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="NM59DDRw" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1780469950; x=1812005950; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=nN9+zsfRheHiwR0iNWCgcstHm1IznAMW4+4pvqexfH0=; b=NM59DDRw+clQwKA73wcK5GBNY+NU1Pdd6DzvntSZ2lVI0oiJC6IU91/S jT9TcJ6WNzPwnDhPvqKGfyH2vyL1o9a+K4hv8NkdyZDQZP/feEPF7EZJN TlzOdPlJCMWYTAjVi5LJvNjyYJ+oYGiync8I25QF6Go8/8meyb1VQdFRA +0QaSv4lOrfHIk7B6mBtKxuEatYLbPZrcwWW7cgYIt8CF9fohw5wCKZQ1 0UooWS5oaaCWYBUASLMWwcVixal7j29pTEplOlWZssVofqDkGy7Dtqc0S u1IgMgiZh8u6JwgAyTVBRmc7bN7QbWJpS4R51vWvdDyd+2OsldOgtamlg A==; X-CSE-ConnectionGUID: uJUwXwksQCSkwNeOf6LMgQ== X-CSE-MsgGUID: allv64AaQBOwW7opxLFwag== X-IronPort-AV: E=Sophos;i="6.24,184,1774335600"; d="scan'208";a="58510248" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 02 Jun 2026 23:59:09 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.58; Tue, 2 Jun 2026 23:59:08 -0700 Received: from [127.0.0.1] (10.10.85.11) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.58 via Frontend Transport; Tue, 2 Jun 2026 23:59:04 -0700 From: Balakrishnan Sambath Date: Wed, 3 Jun 2026 12:28:47 +0530 Subject: [PATCH v6 04/12] media: microchip-isc: fix PM runtime leak in AWB work handler Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-ID: <20260603-microchip-isc-fixes-v6-4-8c3d7474a768@microchip.com> References: <20260603-microchip-isc-fixes-v6-0-8c3d7474a768@microchip.com> In-Reply-To: <20260603-microchip-isc-fixes-v6-0-8c3d7474a768@microchip.com> To: Eugen Hristev , Mauro Carvalho Chehab , Hans Verkuil CC: Laurent Pinchart , Kieran Bingham , Sakari Ailus , Balamanikandan Gunasundar , , , , "Balakrishnan Sambath" X-Mailer: b4 0.14.3 Early return when streaming stops skips pm_runtime_put_sync(), leaking the reference and preventing runtime suspend. Fixes: 91b4e487b0c6 ("media: microchip: add ISC driver as Microchip ISC") Cc: stable@vger.kernel.org Signed-off-by: Balakrishnan Sambath Reviewed-by: Eugen Hristev --- drivers/media/platform/microchip/microchip-isc-base.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/microchip/microchip-isc-base.c b/drivers/media/platform/microchip/microchip-isc-base.c index b19c5a63b4bd..f61a5d5a3e04 100644 --- a/drivers/media/platform/microchip/microchip-isc-base.c +++ b/drivers/media/platform/microchip/microchip-isc-base.c @@ -1429,7 +1429,7 @@ static void isc_awb_work(struct work_struct *w) /* streaming is not active anymore */ if (isc->stop) { mutex_unlock(&isc->awb_mutex); - return; + goto out_pm_put; } isc_update_profile(isc); @@ -1440,6 +1440,7 @@ static void isc_awb_work(struct work_struct *w) if (ctrls->awb) regmap_write(regmap, ISC_CTRLEN, ISC_CTRL_HISREQ); +out_pm_put: pm_runtime_put_sync(isc->dev); } -- 2.34.1