From nobody Sun Feb 8 16:11:57 2026 Received: from sg-1-101.ptr.blmpb.com (sg-1-101.ptr.blmpb.com [118.26.132.101]) (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 6004E30FC37 for ; Thu, 11 Dec 2025 12:38:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=118.26.132.101 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765456698; cv=none; b=UNi83n5npIKZm/RH7vWeynfnNnb+w367ycPLql5/ha51yikCReridgum1eggdkXtTYqSNYrbIDSJDcCu3N+Au0oZFa4blMVz5lQApa9xTdTp5hWFhVW8fcZ8JrMZaN7ZG8RTC1kAA8g/St/JUDA0fPnV36bjEH1te6EztWTqMjo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765456698; c=relaxed/simple; bh=TwavrvwCpUkrQKPWik/OjaMSy6o5WMohj1hJc6u3FYE=; h=Cc:Message-Id:Mime-Version:Content-Type:To:Subject:Date:From; b=QgCc4FrcREVCdCy97D/rXNrTjRwrd+jzwgPn2PX2FBInI0Ifd43mXekxb6aYz6k4TZS7Fh3oQ6AbhyLzWUXTIUR/xI0cK4k6tMvIC9Bw7t5Ka1J5XU4ii1esRwDHCKwNla+pqrVNII/cqrR8H59okxFzW28PjwZRDaaNSIa2MJw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com; spf=pass smtp.mailfrom=bytedance.com; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b=Y1zdOYMd; arc=none smtp.client-ip=118.26.132.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bytedance.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b="Y1zdOYMd" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=2212171451; d=bytedance.com; t=1765456680; h=from:subject: mime-version:from:date:message-id:subject:to:cc:reply-to:content-type: mime-version:in-reply-to:message-id; bh=U0kmftBYFXHIoReqJuzrYqBPPEvLTkdwDn62vqNYTec=; b=Y1zdOYMddifj3NTX8JwlsBFNe1Iyn2AkXhtqP3cjaBxyVtAKBE684NghQ9Gpsy32N/yx6p ao4PVtVf8ceQLXVUURn5M20Ush3hR91KnIymJ3bUJbRZ47OgVcX1kjxHzZgOJgrOqRjcaZ 5Nf1poDuZmK+dl9onk2PgHnHFY2JfH99hy7CyfVuvTuMRpEJgulM71iFfoIG4LeC2YGMXF Vmdq+RQoReZoemgrAxABNto4ITMeMPdFXWH1S05IQX5VwIPLrrE+tIf03K65KEgh2Z/ceU RJcboXj4EqEp1Z3WqinLEmXJe8CfgNdmlpuWOWTAb1UCGP1ziLgGvK9RdhkduQ== Cc: , , , Message-Id: <20251211123635.2215-1-guojinhui.liam@bytedance.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Lms-Return-Path: X-Mailer: git-send-email 2.17.1 To: , , , Subject: [PATCH] PCI: Remove redundant pci_dev_unlock() in pci_slot_trylock() Date: Thu, 11 Dec 2025 20:36:35 +0800 X-Original-From: Jinhui Guo Content-Transfer-Encoding: quoted-printable From: "Jinhui Guo" Content-Type: text/plain; charset="utf-8" Commit a4e772898f8b ("PCI: Add missing bridge lock to pci_bus_lock()") delegates the bridge device's pci_dev_trylock() to pci_bus_trylock() in pci_slot_trylock(), but it leaves a redundant pci_dev_unlock() when pci_bus_trylock() fails. Remove the redundant bridge-device pci_dev_unlock() in pci_slot_trylock(), since that lock is no longer taken there. Fixes: a4e772898f8b ("PCI: Add missing bridge lock to pci_bus_lock()") Cc: stable@vger.kernel.org Signed-off-by: Jinhui Guo --- drivers/pci/pci.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 13dbb405dc31..75a98819db6f 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -5347,7 +5347,6 @@ static int pci_slot_trylock(struct pci_slot *slot) continue; if (dev->subordinate) { if (!pci_bus_trylock(dev->subordinate)) { - pci_dev_unlock(dev); goto unlock; } } else if (!pci_dev_trylock(dev)) --=20 2.20.1