Re: [PATCH] spi: bcmbca-hsspi: Fix error code in probe() function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 02/15/2023 06:05 AM, Dan Carpenter wrote:
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@xxxxxxxxx>
---
  drivers/spi/spi-bcmbca-hsspi.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/spi/spi-bcmbca-hsspi.c b/drivers/spi/spi-bcmbca-hsspi.c
index d58033251c02..c14c1969e2cb 100644
--- a/drivers/spi/spi-bcmbca-hsspi.c
+++ b/drivers/spi/spi-bcmbca-hsspi.c
@@ -546,7 +546,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;
  	}


Reviewed-by: William Zhang <william.zhang@xxxxxxxxxxxx>

Thanks Dan for fixing both drivers!

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux