From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D783418801A; Tue, 30 Jul 2024 16:56:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722358564; cv=none; b=B7SWybc8mIF0ThzLnePz3rlycZYMvIgnlm0SPtCkZ/l6usaOjI1l6hmntLB4D6W4mX71C0s/ObSLkBDFS8Mz4ErwLVsjyGrIisOX4KVP4bTlk3gTA7WRWD5A0hWfo0gz6ZHtxSkBGVNKNlTvsCYoeJMygftKNv0K7f0KUS829Lw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722358564; c=relaxed/simple; bh=YGSRIVnL6VOpGd2FOKkGYVoF0dPsSkB0uNdYBGRv+5g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=U8Kj6MhqlA5VqzfhfRE3yIMDFuI0eqEKr/u4R1ejyEB3fFuYWpn54sgmG9ju+d41kOdgLV2irn8P4x7qJcsJBE00icHW/hlTM5g4Ik4UqmgxuMkCeDLU0ifzMu/swLIPZFeBWwoHVkZptTzsw01rIDzLQ4+4p6R8Nuz7Cr4oH0w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=yO3ZFALk; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="yO3ZFALk" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3F9E4C32782; Tue, 30 Jul 2024 16:56:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1722358563; bh=YGSRIVnL6VOpGd2FOKkGYVoF0dPsSkB0uNdYBGRv+5g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yO3ZFALkGHSvJN4EGHbCCUIH6fx5zWNUXThTbIFDRQ7Xeuj2RyFf3qRhBv7Fv3Tkf Gnox/jYIrHAJAPZCaKGok0H/BJV5ZG8ROu3pjIfwHiDJTLM2RtCZSDy6bqh3Yimp2z YKD0h/MzKJ5Y+bEsQsNsJAcSL2arEWDJM9L996YI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Claudiu Beznea , Guenter Roeck , Wim Van Sebroeck , Sasha Levin Subject: [PATCH 6.1 402/440] watchdog: rzg2l_wdt: Check return status of pm_runtime_put() Date: Tue, 30 Jul 2024 17:50:35 +0200 Message-ID: <20240730151631.501522229@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240730151615.753688326@linuxfoundation.org> References: <20240730151615.753688326@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Claudiu Beznea [ Upstream commit 471e45a33302852bf79bc140fe418782f50734f6 ] pm_runtime_put() may return an error code. Check its return status. Along with it the rzg2l_wdt_set_timeout() function was updated to propagate the result of rzg2l_wdt_stop() to its caller. Fixes: 2cbc5cd0b55f ("watchdog: Add Watchdog Timer driver for RZ/G2L") Signed-off-by: Claudiu Beznea Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20240531065723.1085423-5-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Signed-off-by: Sasha Levin --- drivers/watchdog/rzg2l_wdt.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/watchdog/rzg2l_wdt.c b/drivers/watchdog/rzg2l_wdt.c index 78d904df5f1ea..9b2698a4fc1a1 100644 --- a/drivers/watchdog/rzg2l_wdt.c +++ b/drivers/watchdog/rzg2l_wdt.c @@ -144,9 +144,13 @@ static int rzg2l_wdt_start(struct watchdog_device *wdev) static int rzg2l_wdt_stop(struct watchdog_device *wdev) { struct rzg2l_wdt_priv *priv = watchdog_get_drvdata(wdev); + int ret; rzg2l_wdt_reset(priv); - pm_runtime_put(wdev->parent); + + ret = pm_runtime_put(wdev->parent); + if (ret < 0) + return ret; return 0; } @@ -163,7 +167,10 @@ static int rzg2l_wdt_set_timeout(struct watchdog_device *wdev, unsigned int time * to reset the module) so that it is updated with new timeout values. */ if (watchdog_active(wdev)) { - rzg2l_wdt_stop(wdev); + ret = rzg2l_wdt_stop(wdev); + if (ret) + return ret; + ret = rzg2l_wdt_start(wdev); } -- 2.43.0