ata: simplify the return expression of brcm_ahci_remove
authorMinghao Chi <chi.minghao@zte.com.cn>
Thu, 5 May 2022 02:21:33 +0000 (02:21 +0000)
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>
Mon, 9 May 2022 11:36:00 +0000 (20:36 +0900)
Simplify the return expression.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
drivers/ata/ahci_brcm.c

index ab8552b1ff2a14ad548ba066b93bf3b0bc0f7d83..f61795c546cf128deb6dbb84dedcf4e7ab896a09 100644 (file)
@@ -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)