sata, highbank: simplify the return expression of ahci_highbank_suspend
authorLiu Shixin <liushixin2@huawei.com>
Mon, 21 Sep 2020 08:24:51 +0000 (16:24 +0800)
committerJens Axboe <axboe@kernel.dk>
Fri, 2 Oct 2020 20:53:11 +0000 (14:53 -0600)
Simplify the return expression.

Signed-off-by: Liu Shixin <liushixin2@huawei.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/ata/sata_highbank.c

index ad3893c62572d331d8160ac5ad690d89196f42b3..64b2ef15ec191d7a95adaabdf79064333365c915 100644 (file)
@@ -571,7 +571,6 @@ static int ahci_highbank_suspend(struct device *dev)
        struct ahci_host_priv *hpriv = host->private_data;
        void __iomem *mmio = hpriv->mmio;
        u32 ctl;
-       int rc;
 
        if (hpriv->flags & AHCI_HFLAG_NO_SUSPEND) {
                dev_err(dev, "firmware update required for suspend/resume\n");
@@ -588,11 +587,7 @@ static int ahci_highbank_suspend(struct device *dev)
        writel(ctl, mmio + HOST_CTL);
        readl(mmio + HOST_CTL); /* flush */
 
-       rc = ata_host_suspend(host, PMSG_SUSPEND);
-       if (rc)
-               return rc;
-
-       return 0;
+       return ata_host_suspend(host, PMSG_SUSPEND);
 }
 
 static int ahci_highbank_resume(struct device *dev)