From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0CF97C07E99 for ; Sat, 10 Jul 2021 02:39:12 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D8065613C9 for ; Sat, 10 Jul 2021 02:39:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D8065613C9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=U1zdLGVPCAz9jwj/ydCZcmAhT3BHx8RqBX7aDmd45Jk=; b=vlCY1x27PM2Zgw xGdcDWeHFTYCNdvDI3oYWckuCdfdgokOvJdlQ7x3YG3PLN8WP+5kSXqC/g1YBK4EeINIb/WszY+Bg moKwZTkOiM9I2NaBXtVpqrO3vN5iHnIR1WrxufY66CPxTnx/JWGY6iaWP1lutsh0cjlDvU1A4r1GU 39XJTsG64BeGhdox0pwRoChHeaezE1lqgctfsqWMF4Ot6MuIBoWnvwFyo5XK6SfI8qIX80ysnFmDS Z+x9u+VMVaJ6Fo1FH7GNLMbVUsr9SugDSHCc+aDy+bPCK6xGyZhcADu/EQLSWlfMaHPe++QywK7Qb FlHqGUjMIOKGjnk7EeqQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m22s5-002wEm-7o; Sat, 10 Jul 2021 02:37:37 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m22nB-002t4Q-I9 for linux-arm-kernel@lists.infradead.org; Sat, 10 Jul 2021 02:32:34 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8E8BA61414; Sat, 10 Jul 2021 02:32:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625884353; bh=To1gUqapLgeZjXIKulL3uwXVhMqJs/4HoSOsGhsuboE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=snJxFKexuBL99uPvN7qv0OBzdNxMFVn9toqdbJmPkfHyxMu2EOQuMNvZXc8uLXT1j AOHueQ3gHyKEDGsvyB4Sh79RhvG/TqyndjwN2YOG2iYKZoDz5qEIESqnX469efkEga 2N43C5BeXnjmJjGqxTYmc2Zrz/5bQAsh6O1pwD7cUtvIWn9a1GEs6PX5tB+yehryHW Q6ZBneiiCl7j6mJQuvbl0Cx5gvAQA+tdYpOXFcxJl4C1oft3v0TWBbtD6SFW+Anvoa WqyZESGgslW42NfgEYhomdBaFVEX+uJ8gsaSPRVOtFxm7sCtomYJzSDA/AhqGzFhbL 7RHZP9Vlt+Gbw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Srinivas Neeli , Bartosz Golaszewski , Sasha Levin , linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 4.19 23/39] gpio: zynq: Check return value of pm_runtime_get_sync Date: Fri, 9 Jul 2021 22:31:48 -0400 Message-Id: <20210710023204.3171428-23-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210710023204.3171428-1-sashal@kernel.org> References: <20210710023204.3171428-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210709_193233_662772_A933F9DD X-CRM114-Status: GOOD ( 11.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Srinivas Neeli [ 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 Signed-off-by: Bartosz Golaszewski Signed-off-by: Sasha Levin --- 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 5dec96155814..c2279b28bcb9 100644 --- a/drivers/gpio/gpio-zynq.c +++ b/drivers/gpio/gpio-zynq.c @@ -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); -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel