diff options
author | Srinivas Neeli <srinivas.neeli@xilinx.com> | 2021-04-09 19:38:05 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-07-20 16:21:12 +0200 |
commit | 88097381cb3bf28617751b8898857fbbe6eef074 (patch) | |
tree | d121622c5438606af1c8bd5b7b8ba4000ee74d88 | |
parent | 7c4a0c1e82d2694baa39b1dac6057c5d32ecc842 (diff) | |
download | linux-stable-88097381cb3bf28617751b8898857fbbe6eef074.tar.gz linux-stable-88097381cb3bf28617751b8898857fbbe6eef074.tar.bz2 linux-stable-88097381cb3bf28617751b8898857fbbe6eef074.zip |
gpio: zynq: Check return value of pm_runtime_get_sync
[ Upstream commit a51b2fb94b04ab71e53a71b9fad03fa826941254 ]
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: Srinivas Neeli <srinivas.neeli@xilinx.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | drivers/gpio/gpio-zynq.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-zynq.c b/drivers/gpio/gpio-zynq.c index 6b4d10d6e10f..5038d771ac6e 100644 --- a/drivers/gpio/gpio-zynq.c +++ b/drivers/gpio/gpio-zynq.c @@ -778,8 +778,11 @@ err_pm_dis: 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); |