提交 d3f4caa3 编写于 作者: F Fabio Estevam 提交者: Bjorn Helgaas

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: NFabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
CC: Kishon Vijay Abraham I <kishon@ti.com>
上级 73c8f0cb
...@@ -397,7 +397,7 @@ static int __init dra7xx_pcie_probe(struct platform_device *pdev) ...@@ -397,7 +397,7 @@ static int __init dra7xx_pcie_probe(struct platform_device *pdev)
pm_runtime_enable(dev); pm_runtime_enable(dev);
ret = pm_runtime_get_sync(dev); ret = pm_runtime_get_sync(dev);
if (IS_ERR_VALUE(ret)) { if (ret < 0) {
dev_err(dev, "pm_runtime_get_sync failed\n"); dev_err(dev, "pm_runtime_get_sync failed\n");
goto err_get_sync; goto err_get_sync;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册