spi: bcmbca-hsspi: Fix error code in probe() function
authorDan Carpenter <error27@gmail.com>
Wed, 15 Feb 2023 14:05:32 +0000 (17:05 +0300)
committerMark Brown <broonie@kernel.org>
Wed, 15 Feb 2023 22:29:50 +0000 (22:29 +0000)
This code accidentally returns success instead of a negative error code.

Fixes: a38a2233f23b ("spi: bcmbca-hsspi: Add driver for newer HSSPI controller")
Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: William Zhang <william.zhang@broadcom.com>
Link: https://lore.kernel.org/r/Y+zmrNJ9zjNQpzWq@kili
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-bcmbca-hsspi.c

index e255241319ab1f3c8f74c7fbf474aeeed4d9d3b3..3f9e6131ad8633feb1c7771865098d46a2cab5c7 100644 (file)
@@ -548,7 +548,8 @@ static int bcmbca_hsspi_probe(struct platform_device *pdev)
 
        pm_runtime_enable(&pdev->dev);
 
-       if (sysfs_create_group(&pdev->dev.kobj, &bcmbca_hsspi_group)) {
+       ret = sysfs_create_group(&pdev->dev.kobj, &bcmbca_hsspi_group);
+       if (ret) {
                dev_err(&pdev->dev, "couldn't register sysfs group\n");
                goto out_pm_disable;
        }