Skip to contentSkip to conversation

spi: bcm63xx-hsspi: fix error code in probe

PATCH In review Dan Carpenter 4 participants 4 messages Feb 15, 2023 – Feb 16, 2023

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

PATCH 1/1 spi: bcm63xx-hsspi: fix error code in probe

This code accidentally returns success instead of a negative error code.

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 1e9e906d297c..e481c8d5e5d6 100644
@@ -847,7 +847,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.35.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 14 lines · Dan Carpenter

This code accidentally returns success instead of a negative error code.

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 1e9e906d297c..e481c8d5e5d6 100644

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

Quoted 9 lines
drivers/spi/spi-bcm63xx-hsspi.c +2 -1
@@ -847,7 +847,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;
  	}
maintainer
#3 lore raw
In reply to Dan Carpenter
Quoted 3 lines · Dan Carpenter

This code accidentally returns success instead of a negative error code.

Applied to

broonie/spi.git for-next

Thanks!

[1/1] spi: bcm63xx-hsspi: fix error code in probe

      commit: 97b7cea04f52c3263a74b945a4738f678181b117

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark