Skip to content

Commit

Permalink
PCI: dra7xx: Remove unneeded use of IS_ERR_VALUE()
Browse files Browse the repository at this point in the history
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 <fabio.estevam@freescale.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
CC: Kishon Vijay Abraham I <kishon@ti.com>
  • Loading branch information
Fabio Estevam authored and Bjorn Helgaas committed Aug 20, 2015
1 parent 73c8f0c commit d3f4caa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pci/host/pci-dra7xx.c
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit d3f4caa

Please sign in to comment.