Skip to contentSkip to conversation

spi: bcm63xx-hsspi: fix error return code in bcmbca_hsspi_probe()

PATCH In review Yang Yingliang 2 participants 2 messages Feb 17, 2023 – Feb 20, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 spi: bcm63xx-hsspi: fix error return code in bcmbca_hsspi_probe()

Set the error code when sysfs_create_group() fails in bcmbca_hsspi_probe().

Fixes 50a6620dd1fb ("spi: bcm63xx-hsspi: Add polling mode support")
---
 drivers/spi/spi-bcm63xx-hsspi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/spi/spi-bcm63xx-hsspi.c +2 -1
index 68093c045e0b..cd0a6478f5e7 100644
@@ -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;
 	}
Signature · 1 line
2.25.1
maintainer
#1 lore raw

Hi Yingliang,

Quoted 14 lines · Yang Yingliang

Set the error code when sysfs_create_group() fails in bcmbca_hsspi_probe().

Fixes 50a6620dd1fb ("spi: bcm63xx-hsspi: Add polling mode support")
---
  drivers/spi/spi-bcm63xx-hsspi.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/spi/spi-bcm63xx-hsspi.c +0 -0
index 68093c045e0b..cd0a6478f5e7 100644

drivers/spi/spi-bcm63xx-hsspi.c static int bcm63xx_hsspi_probe(struct platform_device *pdev) · line 856

Quoted 9 lines
drivers/spi/spi-bcm63xx-hsspi.c +2 -1
@@ -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;
  	}

Thanks for the patch but this issue was previously fixed with this patch: https://lore.kernel.org/all/Y+zmoGH6LubPhiI0@kili/