提交 b9520577 编写于 作者: S Srinivas Neeli 提交者: Yang Yingliang

gpio: zynq: Check return value of pm_runtime_get_sync

stable inclusion
from linux-4.19.198
commit c7a13cbc42793ae74a2dff3fd7f543425830258f

--------------------------------

[ Upstream commit a51b2fb9 ]

Return value of "pm_runtime_get_sync" API was neither captured nor checked.
Fixed it by capturing the return value and then checking for any warning.

Addresses-Coverity: "check_return"
Signed-off-by: NSrinivas Neeli <srinivas.neeli@xilinx.com>
Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 b6953cd7
......@@ -919,8 +919,11 @@ static int zynq_gpio_probe(struct platform_device *pdev)
static int zynq_gpio_remove(struct platform_device *pdev)
{
struct zynq_gpio *gpio = platform_get_drvdata(pdev);
int ret;
pm_runtime_get_sync(&pdev->dev);
ret = pm_runtime_get_sync(&pdev->dev);
if (ret < 0)
dev_warn(&pdev->dev, "pm_runtime_get_sync() Failed\n");
gpiochip_remove(&gpio->chip);
clk_disable_unprepare(gpio->clk);
device_set_wakeup_capable(&pdev->dev, 0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册