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 6C9C23F4111; Wed, 27 May 2026 11:07:41 +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=1779880062; cv=none; b=Nv/4sKrNdXfBpqxl0TPFnphZfbDjtbUizYuaUT54iySaXFVjVi9zj7eAWLDxUm5bAZQiLOZDfsrlDz3ygEkWj5xkO7A1JC0IfsRLGOLjwZmbk/dcBTatsMeqNELodC+h+6rnyoXZFgaUV6MKkwRdWB0XU5ffZu3juuQ4YpAoNao= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779880062; c=relaxed/simple; bh=nN9+zsfRheHiwR0iNWCgcstHm1IznAMW4+4pvqexfH0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=svPEjRqScADleS4m+pCucoqCKSOoTNGgitJG3kZqiHWZsuH3E3keWmC+4fQcrDsoz3AJhybBDvCjPNdDPv1lFvCRCQJg5HlCMbQ6zb2LkvjI5F8V9v+t24T/+vYmpD5zwco6aw08wQ8GVCULtx4LGu0Qae/cRu9HdVYUvy+LeSM= 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=tEbf/UHL; 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="tEbf/UHL" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1779880061; x=1811416061; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=nN9+zsfRheHiwR0iNWCgcstHm1IznAMW4+4pvqexfH0=; b=tEbf/UHLGu+cbddBrs3HdAtTPGStfCF3BldA78haL9nJwNi8Tt1IR1aZ Tr0A64FHLxhAL2YmTAkFYmQnePJafbSg/8Ws8dFwJa523NDppfffwuJoP OrO81JmgdFUf0YJ6AAjUWAR8Y4Lum9D1skNmxPdyzGr9rDh36fdjiIhHU mOGHu9JcmLiYaP+x3bAupWqG/CoBZLQUmBKKlGJBQWpiyNzrZwSPqfC54 QlGDF31xVbHP0mnJ352iFiFw5MWUDD6Ai+v0E+bW0ryGdowsNdxQlI79w /+QOhWNFloFr0akZG5efutmdPTFGtVnAM9w22NkMiJz2zz/yhABExtM3r w==; X-CSE-ConnectionGUID: 3z9xbcEeTsOTnYxEXs0bdg== X-CSE-MsgGUID: R9ZdlWdFQ8y1OwvuWZyL5w== X-IronPort-AV: E=Sophos;i="6.24,171,1774335600"; d="scan'208";a="66995036" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 27 May 2026 04:07:40 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.58; Wed, 27 May 2026 04:07:40 -0700 Received: from [127.0.0.1] (10.10.85.11) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2507.58 via Frontend Transport; Wed, 27 May 2026 04:07:36 -0700 From: Balakrishnan Sambath Date: Wed, 27 May 2026 16:37:20 +0530 Subject: [PATCH v5 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: <20260527-microchip-isc-fixes-v5-4-b0ec1bb954be@microchip.com> References: <20260527-microchip-isc-fixes-v5-0-b0ec1bb954be@microchip.com> In-Reply-To: <20260527-microchip-isc-fixes-v5-0-b0ec1bb954be@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