Skip to contentSkip to conversation

ata: simplify the return expression of brcm_ahci_remove

PATCH Applied [email protected] 2 participants 2 messages May 5, 2022 – May 9, 2022 libata

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ata: simplify the return expression of brcm_ahci_remove

From: Minghao Chi <[email protected]>

Simplify the return expression.

---
 drivers/ata/ahci_brcm.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/ata/ahci_brcm.c +1 -6
index ab8552b1ff2a..f61795c546cf 100644
@@ -549,15 +549,10 @@ static int brcm_ahci_remove(struct platform_device *pdev)
 	struct ata_host *host = dev_get_drvdata(&pdev->dev);
 	struct ahci_host_priv *hpriv = host->private_data;
 	struct brcm_ahci_priv *priv = hpriv->plat_data;
-	int ret;
 
 	brcm_sata_phys_disable(priv);
 
-	ret = ata_platform_remove_one(pdev);
-	if (ret)
-		return ret;
-
-	return 0;
+	return ata_platform_remove_one(pdev);
 }
 
 static void brcm_ahci_shutdown(struct platform_device *pdev)
Signature · 1 line
2.25.1
#1 lore raw
Quoted 21 lines · On 2022/05/05 11:21, [email protected] wrote:

From: Minghao Chi <[email protected]>

Simplify the return expression.

---
 drivers/ata/ahci_brcm.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/ata/ahci_brcm.c +0 -1
index ab8552b1ff2a..f61795c546cf 100644
@@ -549,15 +549,10 @@ static int brcm_ahci_remove(struct platform_device *pdev)
 	struct ata_host *host = dev_get_drvdata(&pdev->dev);
 	struct ahci_host_priv *hpriv = host->private_data;
 	struct brcm_ahci_priv *priv = hpriv->plat_data;
-	int ret;
 
 	brcm_sata_phys_disable(priv);

drivers/ata/ahci_brcm.c static int brcm_ahci_remove(struct platform_device *pdev) · line 558

Quoted 10 lines
drivers/ata/ahci_brcm.c +1 -5
 
-	ret = ata_platform_remove_one(pdev);
-	if (ret)
-		return ret;
-
-	return 0;
+	return ata_platform_remove_one(pdev);
 }
 
 static void brcm_ahci_shutdown(struct platform_device *pdev)

Applied to for-5.19. Thanks !

Signature · 2 lines
Damien Le Moal
Western Digital Research