From nobody Mon Dec 1 22:05:05 2025 Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) (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 9FA4622127B for ; Sun, 30 Nov 2025 09:14:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.67 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764494052; cv=none; b=pO63GBcsMqatj7HmjhHEosONXAs44pTWpWn6raCRDmzD0mnLONbarPjrXfaPb0NPScji1NloNNzAMMcNmw7fglo29BAX2/PKaQkhlrSfKyHvN7JJ7A1Oc1xHBNW/K3J0bfwnTvC36+Me2orcRcXGi7DPzIuda0JOWeGKrx/68Bo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764494052; c=relaxed/simple; bh=MGGriOeY9GnM5WbLP7Ub+yvZgeskrMWaNCIjfY8JhaQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=mTywXTWkU/sHGDRF1kb9LsObkbuu3g4roiuwinlM2+Mh25mF20yqzoKdhUSN7blZu+Y5JghobEOBlobgTvRU+Aq/4WLXmmKscUmvLfSWfLR4wDtzGXEKWk51j7XGH7lC8F64GWHcRk9TlitfZTDCQMrRFFTkEcbDc/X1iAA+p8c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=cdwjL5Vw; arc=none smtp.client-ip=209.85.221.67 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="cdwjL5Vw" Received: by mail-wr1-f67.google.com with SMTP id ffacd0b85a97d-42e2d5e119fso254456f8f.2 for ; Sun, 30 Nov 2025 01:14:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1764494049; x=1765098849; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=qonFTC9cukq617453+SfG5fIkZheN8Tb5aZ9YtE+WGM=; b=cdwjL5VwwtarqPjWoinFvo5MjKv8TzenXQRDh3TMUuVXtSg7Ll0ncgt95uH8eYZq3m bVdSGZtKdcJiAIfliVK5yTgvXf7zckG37RdFCPj+uMO7/31ynKIueWTEE7tkZFtp9d8x kUzNi5OPz/fLiINu71ZRalxWn+1QTwV3yA4at/1GAHCuW6oa+RIviOpPmoBNTk7sx+bG 0De02VQ7QGZSZfEacLnr12RsnjBwApWX0nYrO7u8W5ociAIiutck44V7adKiJ0gQFnh3 uwdM4d03wyISMXu2KOZPhT5XWxY1v/7Qvivn1iOttVrdFlWOr0J2594l6194qNjoZuXi Xp3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764494049; x=1765098849; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=qonFTC9cukq617453+SfG5fIkZheN8Tb5aZ9YtE+WGM=; b=QjDUw9CGAYHkSI+FwNJt3vdp1EGRVhttjzxVosz9SJj7QcBTq95g+td9flAI1JM0gP 1a0VH/+ZnZ529KDU/Np7R8mfw93bgaUxeH3KKYuAs0i2QTpt+29U8Okqvid9lPrJRYyR PbjTI7m1ZoaOALhXJHDNPNJSmbcrqqACRkjLHlnHmpyMAoZPY+TBI/sq+OYndcLVyqW1 /4yl/UA324Ogra0Y/llgFLcCjsZ8ced3IfoKxh2AlAtZj+l8bZpvLmpmReJnAJFyKlOQ Q96D1d/u1820LbYufod4g4AtR4bHrKxxgA6HZ7KVXiGNUwaXAPxNcGrhWcgWFGujINq/ yiuw== X-Forwarded-Encrypted: i=1; AJvYcCVLqe9gMs6STChfudmPuUpXXIUEjD2UagGQnz0l/+Jdq93URsJW8LF5xk+M7wQYKawITLIFYHe7Gtxb9AI=@vger.kernel.org X-Gm-Message-State: AOJu0YwABzzE/W2fayfFUDFe5tQw9J+jviMGlq1iZLAP4kcM31aPoC76 N7yx4qCHumqpQhoBNyzp8sbbK3To4RmIU3aG5JxhR4SK/QkMuyCu7LxE X-Gm-Gg: ASbGncuGGa4TFcFOMkWP/rnRYOmXEz7N3kJ+Src6evawLh3frljpCeLvm3CEpTmBFfE yICr1wRqWf4TudWItLyzEDm2tGgX+2wvFLCWvPustfUHmB/+UZulZvKdCKWoIgOQzhjJS2jSQiL FLb7FSY+b4BuhR+2vdJYGZprkYJjgGcndtuT4cKWdCuOY9VDxg2E0bJwug8+WaHod2JiEDdQxm/ 0oHsLC9D23Q97Sff6liEDb8vKRUu/rJD6jE/yO7V2XFlb8xBN2rJZpGk9crpwJLm5irWT6GhYXA DjhxPFL0obSIg491gc5p0kaTvr4FNLg4y81nOkiBY9h66NIL/SJNuR8h54n4dSnzIgbEB9Cp4s3 SmP3gL6Hz638zhXowZnF6wOhyYORXg1oHu47Gvna6BmHiXJce/Jn7oOi0WfRa9WgkB10/cdgnUW 81dJhvKZJvrg0lkZrKIW0M1CPKVO8Bpv7sFzph6AIqbi8= X-Google-Smtp-Source: AGHT+IHcdFLcZ96GpxA116dFShtGE7sfX94uNLz5L013+p+MhI9x785xRWvj4LDpM1cT3MV1aytapQ== X-Received: by 2002:a05:6000:26c4:b0:42b:2fc8:170 with SMTP id ffacd0b85a97d-42cc1ab8a59mr36772953f8f.12.1764494048887; Sun, 30 Nov 2025 01:14:08 -0800 (PST) Received: from localhost.localdomain ([39.46.201.138]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-42e1ca8e00fsm19230232f8f.34.2025.11.30.01.14.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Nov 2025 01:14:08 -0800 (PST) From: Ali Tariq To: broonie@kernel.org Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, khairul.anuar.romli@altera.com, adrianhoyin.ng@altera.com, nirav.rabara@altera.com, matthew.gerlach@altera.com, Ali Tariq Subject: [PATCH] spi: cadence-qspi: Fix runtime PM imbalance in probe Date: Sun, 30 Nov 2025 09:12:51 +0000 Message-ID: <20251130091251.12120-1-alitariq45892@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The probe function incorrectly calls pm_runtime_put_autosuspend() twice in succession at the end of successful probe, dropping two runtime PM references while only one was acquired earlier with pm_runtime_get_sync(). This causes a usage count underflow: cadence-qspi 13010000.spi: Runtime PM usage count underflow! Remove the first redundant pm_runtime_put_autosuspend() call to balance the reference count. Tested on StarFive VisionFive 2 v1.2A board. Fixes: 30dbc1c8d50f ("spi: cadence-qspi: defer runtime support on socfpga i= f reset bit is enabled") Signed-off-by: Ali Tariq --- drivers/spi/spi-cadence-quadspi.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-qu= adspi.c index 81017402bc56..638edca3805a 100644 --- a/drivers/spi/spi-cadence-quadspi.c +++ b/drivers/spi/spi-cadence-quadspi.c @@ -2012,7 +2012,6 @@ static int cqspi_probe(struct platform_device *pdev) } =20 if (!(ddata && (ddata->quirks & CQSPI_DISABLE_RUNTIME_PM))) { - pm_runtime_put_autosuspend(dev); pm_runtime_mark_last_busy(dev); pm_runtime_put_autosuspend(dev); } --=20 2.43.0