From: Fabio Estevam Date: Thu, 20 Aug 2015 06:30:36 +0000 (-0500) Subject: PCI: dra7xx: Remove unneeded use of IS_ERR_VALUE() X-Git-Tag: v4.13~4645^2~1^2 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=d3f4caa355c1c9d2ce7fd3da88e2be37836323db;p=mirror_ubuntu-bionic-kernel.git PCI: dra7xx: Remove unneeded use of IS_ERR_VALUE() There is no need to use the IS_ERR_VALUE() macro for checking the return value from pm_runtime_* functions. Test for a negative pm_runtime_get_sync() return value instead of using IS_ERR_VALUE(). The semantic patch that makes this change is available in scripts/coccinelle/api/pm_runtime.cocci. Signed-off-by: Fabio Estevam Signed-off-by: Bjorn Helgaas CC: Kishon Vijay Abraham I --- diff --git a/drivers/pci/host/pci-dra7xx.c b/drivers/pci/host/pci-dra7xx.c index abb85a157ce0..190989908a1a 100644 --- a/drivers/pci/host/pci-dra7xx.c +++ b/drivers/pci/host/pci-dra7xx.c @@ -397,7 +397,7 @@ static int __init dra7xx_pcie_probe(struct platform_device *pdev) pm_runtime_enable(dev); ret = pm_runtime_get_sync(dev); - if (IS_ERR_VALUE(ret)) { + if (ret < 0) { dev_err(dev, "pm_runtime_get_sync failed\n"); goto err_get_sync; }