summaryrefslogtreecommitdiff
path: root/drivers/ata/libata-core.c
diff options
context:
space:
mode:
authorSergey Shtylyov <s.shtylyov@omp.ru>2022-02-02 23:58:21 +0300
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>2022-02-19 05:18:35 +0300
commitec87cf3782f7b05ae15e061d36c763c35488f292 (patch)
treefd9579e56dd60e6a241f1fd55be48d7a4fc45c1e /drivers/ata/libata-core.c
parentac1eb6655be440b6c0199f6bc9d20d610fc29d0d (diff)
downloadlinux-ec87cf3782f7b05ae15e061d36c763c35488f292.tar.xz
ata: libata: make ata_host_suspend() *void*
ata_host_suspend() always returns 0, so the result checks in many drivers look pointless. Let's make this function return *void* instead of *int*. Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool. Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Diffstat (limited to 'drivers/ata/libata-core.c')
-rw-r--r--drivers/ata/libata-core.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 3ceda1fa243d..0ddb49f2ece1 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -5170,10 +5170,9 @@ EXPORT_SYMBOL_GPL(ata_sas_port_resume);
*
* Suspend @host. Actual operation is performed by port suspend.
*/
-int ata_host_suspend(struct ata_host *host, pm_message_t mesg)
+void ata_host_suspend(struct ata_host *host, pm_message_t mesg)
{
host->dev->power.power_state = mesg;
- return 0;
}
EXPORT_SYMBOL_GPL(ata_host_suspend);
@@ -6090,11 +6089,8 @@ EXPORT_SYMBOL_GPL(ata_pci_device_do_resume);
int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg)
{
struct ata_host *host = pci_get_drvdata(pdev);
- int rc = 0;
- rc = ata_host_suspend(host, mesg);
- if (rc)
- return rc;
+ ata_host_suspend(host, mesg);
ata_pci_device_do_suspend(pdev, mesg);