Received: from cstnet.cn (smtp81.cstnet.cn [159.226.251.81]) (using TLSv1.2 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA50E27603A for ; Tue, 16 Jun 2026 00:43:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.226.251.81 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781570634; cv=none; b=YxnHLYu20YEQMizawu/4MLojLyxuuDxnEvqbuyUpGen+IAbWLMg/nUGkJd+QxdfOvLVOEM5MuqoEZCy8Yp479t043pOfsoVgZgPka1hnRWG48I9sZUJ+ji+uzy9/miu4yFDkJMw4FLo4qr4+mcD45HrI9apjC/s0ygvjz9nFM4A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781570634; c=relaxed/simple; bh=IGvVIvpRIn34gpvN0WtTnH9HM0h+I9qj8fn3wNbwtzc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=cSgCQyVvXz+CNIHJMuDMMSfzyG/gtYq4+2hek6eGq0SWuRqEkYfTHp/gAsUORBNoqBXJqYIbpxVKnBJdi08uPIsUQ8xsLeqrgX7UyvvtuSysV32idXSxR8tZ65DeqDOqSqin1/WJrBwAqcqIOu/AMW7oZRCNW4/MW0h/XlBwX0E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=iscas.ac.cn; spf=pass smtp.mailfrom=iscas.ac.cn; arc=none smtp.client-ip=159.226.251.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=iscas.ac.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=iscas.ac.cn Received: from localhost.localdomain (unknown [111.196.245.140]) by APP-03 (Coremail) with SMTP id rQCowACHp95GnDBq4GneFA--.50883S2; Tue, 16 Jun 2026 08:43:50 +0800 (CST) From: Pengpeng Hou To: Sebastian Reichel , linux-kernel@vger.kernel.org Cc: Pengpeng Hou Subject: [PATCH] hsi: omap_ssi: remove debugfs on port creation failure Date: Tue, 16 Jun 2026 08:43:48 +0800 Message-ID: <20260616004348.97684-1-pengpeng@iscas.ac.cn> X-Mailer: git-send-email 2.50.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID:rQCowACHp95GnDBq4GneFA--.50883S2 X-Coremail-Antispam: 1UD129KBjvdXoWrZrykuw4rtFW8JFWxJw45Awb_yoWDtFX_C3 W0vFn7ur4DJF92krnavr1rZayFya1UZa1UKa4fta1aqFySqF43XF1qvrZxZ3yIkwn8uFy5 Jr4jvrWDAw4UAjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbz8FF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8w A2z4x0Y4vE2Ix0cI8IcVAFwI0_Xr0_Ar1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Gr0_ Cr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AKxVWxJr 0_GcWle2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E 2Ix0cI8IcVAFwI0_Jrv_JF1lYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJV W8JwACjcxG0xvY0x0EwIxGrwACjI8F5VA0II8E6IAqYI8I648v4I1l42xK82IYc2Ij64vI r41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8Gjc xK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1Y6r17MIIYrxkI7VAKI48JMIIF0xvE2Ix0 cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r4j6F4UMIIF0xvE42xK8V AvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E 14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjfUYDGYDUUUU X-CM-SenderInfo: pshqw1xhqjqxpvfd2hldfou0/ ssi_probe() creates the controller debugfs tree before creating the SSI port child devices. If a port device cannot be created, the error path removes any children and tears down the controller, but leaves the debugfs tree behind. Remove the controller debugfs tree on the port creation failure path, matching the normal remove path. Signed-off-by: Pengpeng Hou --- drivers/hsi/controllers/omap_ssi_core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/hsi/controllers/omap_ssi_core.c b/drivers/hsi/controllers/omap_ssi_core.c index eeacc427fd65..d9be0c3ea351 100644 --- a/drivers/hsi/controllers/omap_ssi_core.c +++ b/drivers/hsi/controllers/omap_ssi_core.c @@ -529,6 +529,9 @@ static int ssi_probe(struct platform_device *pd) return err; out3: device_for_each_child(&pd->dev, NULL, ssi_remove_ports); +#ifdef CONFIG_DEBUG_FS + ssi_debug_remove_ctrl(ssi); +#endif out2: ssi_remove_controller(ssi); pm_runtime_disable(&pd->dev); -- 2.50.1 (Apple Git-155)