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

Fixes: 50a6620dd1fb ("spi: bcm63xx-hsspi: Add polling mode support")
Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: William Zhang <william.zhang@broadcom.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/Y+zmoGH6LubPhiI0@kili
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-bcm63xx-hsspi.c

index 68093c0..cd0a647 100644 (file)
@@ -849,7 +849,8 @@ static int bcm63xx_hsspi_probe(struct platform_device *pdev)
 
        pm_runtime_enable(&pdev->dev);
 
-       if (sysfs_create_group(&pdev->dev.kobj, &bcm63xx_hsspi_group)) {
+       ret = sysfs_create_group(&pdev->dev.kobj, &bcm63xx_hsspi_group);
+       if (ret) {
                dev_err(&pdev->dev, "couldn't register sysfs group\n");
                goto out_pm_disable;
        }