]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
staging: vchiq_arm: Register debugfs after cdev
authorStefan Wahren <wahrenst@gmx.net>
Sun, 9 Mar 2025 12:50:10 +0000 (13:50 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:39:25 +0000 (14:39 +0200)
[ Upstream commit 63f4dbb196db60a8536ba3d1b835d597a83f6cbb ]

The commit 2a4d15a4ae98 ("staging: vchiq: Refactor vchiq cdev code")
moved the debugfs directory creation before vchiq character device
registration. In case the latter fails, the debugfs directory won't
be cleaned up.

Fixes: 2a4d15a4ae98 ("staging: vchiq: Refactor vchiq cdev code")
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Link: https://lore.kernel.org/r/20250309125014.37166-2-wahrenst@gmx.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c

index 5fab33adf58ed030a3c369c6667d6d5d6da5635a..ecf6e9635a10bc9f7b6c1cd09e2b9208618ae0be 100644 (file)
@@ -1745,8 +1745,6 @@ static int vchiq_probe(struct platform_device *pdev)
        if (ret)
                goto failed_platform_init;
 
-       vchiq_debugfs_init(&mgmt->state);
-
        dev_dbg(&pdev->dev, "arm: platform initialised - version %d (min %d)\n",
                VCHIQ_VERSION, VCHIQ_VERSION_MIN);
 
@@ -1760,6 +1758,8 @@ static int vchiq_probe(struct platform_device *pdev)
                goto error_exit;
        }
 
+       vchiq_debugfs_init(&mgmt->state);
+
        bcm2835_audio = vchiq_device_register(&pdev->dev, "bcm2835-audio");
        bcm2835_camera = vchiq_device_register(&pdev->dev, "bcm2835-camera");