summaryrefslogtreecommitdiff
path: root/drivers/gpio
diff options
context:
space:
mode:
authorSrinivas Neeli <srinivas.neeli@xilinx.com>2021-04-09 17:08:05 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-07-20 17:05:43 +0300
commit3d2b0818daa421b1619cf3bf5f2b2a6788cebcf2 (patch)
tree957e3c018c17f0db62f1b6875e5677f80ba297c0 /drivers/gpio
parent71f8d7fbfe8e5c86fc046cf212eabd25d365591a (diff)
downloadlinux-3d2b0818daa421b1619cf3bf5f2b2a6788cebcf2.tar.xz
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>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-zynq.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-zynq.c b/drivers/gpio/gpio-zynq.c
index 3521c1dc3ac0..fb8684d70fe3 100644
--- a/drivers/gpio/gpio-zynq.c
+++ b/drivers/gpio/gpio-zynq.c
@@ -1001,8 +1001,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);