From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 61EFC36DA18 for ; Wed, 19 Aug 2026 11:03:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787137423; cv=none; b=u3hzLcA8zHoSCL8BiWLr6VyHdsCT3QtlyPa5Xg6B6PayJRWcVh/89uZeE3bqJ+UFRP0pNchd3pF7zabGe5ExvvCCekS8mHHD71xeFc2jG8c4v6azuYsWE/pMqpdf1ZS2mNtB2jXYsIDmIe9NUKEALqdK6R4Rh6t06yyHMn7JOac= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787137423; c=relaxed/simple; bh=QBojQsi8wY+kAhHZS4n4dE92YBUTLKJtOxmkrL4V4pY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=GVO98LmU0KysYSEBLWDR07xIZeoWmHRyC2vOLdGx+ylys18pWq7FHppj+24ySQwdihm+19sk2sSN4+86IGUUnlpxGSFDbt2Uq8zF2Wo4ohQRGh2WV0kSi01Ts0rmCUAmTPyeimf8Hv1x7JCaxH4nhUJof+dSER9PC3m3B7oWUd4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=pg2z3eWx; arc=none smtp.client-ip=209.85.167.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="pg2z3eWx" Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-5aeb72b0af1so131545e87.3 for ; Wed, 19 Aug 2026 04:03:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1787137420; x=1787742220; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from:references :cc:to:subject:user-agent:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to:content-type; bh=A4ELa6x+Yb5HCgORI6eX8lid0seyZkrG1l18lRvxugE=; b=pg2z3eWxK7eWErztV+PPmYVcQa3PCKvlEAE+KVuS6Hw9VpalQcpiPtIr9ueHzNZHZc zeeoDDcITYKYRILPgfe82rXRMvcULtYKFMaNIo8I1NE7xdOwFQ7x3D85S2mSNM1q3lzK nBFoG9hjmH9xFG8M8UAbW0I2tZuNYXp3+nB6ooO9M8ypah5QQ1FYDx+fTALdkkCRdUtg tzCkAkS8yz1ZzK6ZjU0177qb0yY2o/SVP2BgWlkhNmHDpcNEx2ShiAPynA218hLpq26h wb8s2m2bU8+bdK7Rc7I8fQufXbvHKpp91sqzoQONqLERsAvBX4mVTZp4FLetUw7Y3qox KFTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787137420; x=1787742220; h=content-transfer-encoding:content-type:in-reply-to:from:references :cc:to:subject:user-agent:mime-version:date:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=A4ELa6x+Yb5HCgORI6eX8lid0seyZkrG1l18lRvxugE=; b=GT3RqEffJPHzyMz/3pfveVGTFOSwOSpGU8nQvJT9n7sRIn63Sre2zuznYDD5ND2AjX /bJ9wLXYxcE0jYPdmWrO6tIYnMT7OGCbk15fMbspQaUgpIITBsmlyqULSwMAqORgd79r LxY7BtxhG+PUXWgll7XSyvb7PzRJhbIxn1gENHLUZxbuOgOcz1sbRYGZIqrmst/Ki0Lm EnlVYOfGn5w6ehXqBGSff53KKcnEXTb/ihq2A8ZRiByw0z4kFWKBqzKrfNMVqLgkvr85 n61yASDZQIXio5V2tv57XXYWvwyyAmnM/4hp6lBqrOdPy9PC0Tko08pMBhx39NKFDLz4 NH4g== X-Forwarded-Encrypted: i=1; AHgh+Rp/Tt7f6LdK2+JlhJQAuNiwQznm2gVMAG+aC1AU836cWAfWn/smvr1D3Jr3cZGkRj1sDdpkGVOJjyyawjE=@vger.kernel.org X-Gm-Message-State: AOJu0Yyfm0b6m0KysqLGcBeivRzA3lbtB7tLrwFmfae3dTcxMsUfTR7R P/AfaUfxd1sfkDb+0k1PlAt1snSZcg6Gxzp6EDm/wpHHLs3TlaXGWIvhrp0xlnXsm7U= X-Gm-Gg: AR+sD108Px2xKZpt6DY/Hzp1431PiBKYRTWn6JkmDlpmO5DqDIcaqFA1UOO594bo3dV wY4FS4n89dXVj9EM2QiB1ByDhkSMoaLKLhosC9uhpRdLRCCnudPPKfcxhzGKmNNm9FBqs6IQVK0 2xo9zsF5p3a0RPLpirRt0OP/WdK9gLnXZjJzQNDyAV0l2QMVa079ZI1YylDPPYO7o9FPAYL4FSN J2XaBEJ1D8hEzcHfxHScUmnNBhYwo0z1PaCmiSo8gA7hQJWK6TrFDUC7KvBp6z7HAQHqOiP2lM3 b3lRjaW5+2yePM5nbsBGrPB+16eRIVSxy/73grvz+bn+jVpg9HWcBaO5h0EwgV1IwcZHDKtiBtz itJtuUokrLFpgodd1zI9hS30J9UMUx9U3my1+3aFYzX1GFguRu8z4ECGQskR5YXdGXNURI4cKsP 1/wlmGXeJO2WUjPgZoEZfCYSJM7dDK2tfB7WxR48yBEOW5/EDvYCtRIw5Zn9vPg0tRAYhtGIaPV Hhvy996MGTQMhro87NXeLKF5t45I09O5F/Z2Yrl8g== X-Received: by 2002:a05:6512:3c8f:b0:5ae:b2df:c11a with SMTP id 2adb3069b0e04-5b4788fa611mr702473e87.0.1787137420382; Wed, 19 Aug 2026 04:03:40 -0700 (PDT) Received: from [192.168.1.100] (91-159-24-186.elisa-laajakaista.fi. [91.159.24.186]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5b4788eb02csm430814e87.68.2026.08.19.04.03.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Aug 2026 04:03:39 -0700 (PDT) Message-ID: <440f21a9-4564-4f89-bbef-4095414e486e@linaro.org> Date: Wed, 19 Aug 2026 14:03:38 +0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] i2c: qcom-cci: fix autosuspend cleanup To: Guangshuo Li , Loic Poulain , Robert Foss , Andi Shyti , Todor Tomov , Wolfram Sang , Vinod Koul , Bjorn Andersson , linux-i2c@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org References: <20260812094425.3515179-1-lgs201920130244@gmail.com> From: Vladimir Zapolskiy In-Reply-To: <20260812094425.3515179-1-lgs201920130244@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 8/12/26 12:44, Guangshuo Li wrote: > cci_probe() calls pm_runtime_use_autosuspend(), but the remove path > does not call the matching pm_runtime_dont_use_autosuspend() before > disabling runtime PM. > > If the autosuspend delay is set to a negative value while autosuspend > is enabled, the runtime PM core increments usage_count to prevent > runtime suspend. Without undoing the autosuspend setting during > teardown, this reference is not dropped and usage_count remains > unbalanced. > > Use devm_pm_runtime_set_active_enabled() to manage the runtime PM > state. Its managed cleanup disables autosuspend and runtime PM and > restores the suspended state on probe failure and driver removal. > Remove the now redundant manual runtime PM cleanup. > > This issue was found by manual code inspection. > > Fixes: e517526195de ("i2c: Add Qualcomm CCI I2C driver") > Cc: stable@vger.kernel.org > Signed-off-by: Guangshuo Li Reviewed-by: Vladimir Zapolskiy -- Best wishes, Vladimir