[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210409140806.31824-3-srinivas.neeli@xilinx.com>
Date: Fri, 9 Apr 2021 19:38:05 +0530
From: Srinivas Neeli <srinivas.neeli@...inx.com>
To: <linus.walleij@...aro.org>, <bgolaszewski@...libre.com>,
<michal.simek@...inx.com>, <shubhrajyoti.datta@...inx.com>,
<sgoud@...inx.com>
CC: <linux-gpio@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>, <git@...inx.com>,
Srinivas Neeli <srinivas.neeli@...inx.com>
Subject: [PATCH 2/3] gpio: zynq: Check return value of pm_runtime_get_sync
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@...inx.com>
---
drivers/gpio/gpio-zynq.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpio/gpio-zynq.c b/drivers/gpio/gpio-zynq.c
index bb1ac0c5cf26..c91302a16c77 100644
--- a/drivers/gpio/gpio-zynq.c
+++ b/drivers/gpio/gpio-zynq.c
@@ -1001,8 +1001,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);
--
2.9.1
Powered by blists - more mailing lists