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>
This commit is contained in:
parent
7c4a0c1e82
commit
88097381cb
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user