Received: by 2002:a05:7412:2a8a:b0:fc:a2b0:25d7 with SMTP id u10csp292309rdh; Wed, 7 Feb 2024 05:09:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IHCLf8XTUl7AxAuRCVhEiM+KjvRY7jhnoe64lSRxj+M22cJ7Wl+4gPF8Syl58FmmVnPEOqD X-Received: by 2002:ac8:4788:0:b0:42b:eea9:7eb8 with SMTP id k8-20020ac84788000000b0042beea97eb8mr6088927qtq.56.1707311351799; Wed, 07 Feb 2024 05:09:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707311351; cv=pass; d=google.com; s=arc-20160816; b=qxj9H6h2ccAjS2MKZWJDC51QUHKeHROn3OUUPJX8jKYxyT7G7hNEEgb49xHrBDQNeE mdLcV2qCwbFemYQlHkucIWm9r/Ex3sFtMunOH+nIC0QP+ViBsmH+6GDxCXWy3A5JpjuV XsWZ4Hmtq2Pht4gD1BneEUCan+nUk2BWpFbIDCrIQ64eTI9tg2XooCtM8oKBIfp8bZuK abd8nrHD/y4MWmPauPnsij1R0jCm6B8gxYRDg5Jate2WJGg5ip6YyXlKVzVvqHwZ21sE qv5FewhZ29fH+/4RIPdmXqBpM4w0cYCdYiBQZRbh6P9xjYnUVf2ls8y6ii5oDG0x0SxQ 8mdQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=TsvoQxJKgykHPmELvvoo0iWdxFiWSLC86SAFUlR5Bv0=; fh=QEcjLk8KjXzTxVTN7DjJVs7j1lv7gWtFEQZnPRNTBGg=; b=BLm/gzSZ9xpSQMNmoJJZpTZQV1bh2YhjeBA/kEwaDlc/MuuqMESZ/DVVX7TivkPMxw ivKCMkdtx7hIlDRvGb3SW2OdbJI8IWu6kVfaM20VjY/pcyvpf30v9NZyU880i+hnO0Se fAsqQNm7xwzKDbrx+U5i2v6ymzc7Hb8TE82JJmCwJByXalmmUqjHT/VPcvF1k4N3Fl+H 67uxw8CvWOn6zsjgrOPYK5z/MaRLugrQF2/8gyPygYmikGX3sKsFm1aornrlCLARzo1V 82OuR8P6j9bBQKzQYgYOQIT5+bqx+cDMYwrn9BEu0sjywb8wqDUs2aw4/kGxdhac7Qes SFtw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=pDLC+FLf; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-56513-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56513-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCXHTU8KEeABEl/vu+jwUk23bfjzal1Zbc5qkraYAlnPmVEuYHFd54mR3u5nlurPkrZ+mnbGZLnN2JkDjtQ77G6/DrutFs/mRUD5xVpraw== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id j14-20020a05622a038e00b0042c43231de8si640585qtx.153.2024.02.07.05.09.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 05:09:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-56513-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=pDLC+FLf; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-56513-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56513-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 7A7331C25120 for ; Wed, 7 Feb 2024 13:09:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 785857C099; Wed, 7 Feb 2024 13:08:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="pDLC+FLf" Received: from mail-qv1-f49.google.com (mail-qv1-f49.google.com [209.85.219.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 064797C082 for ; Wed, 7 Feb 2024 13:08:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707311293; cv=none; b=HgfhOjMncP+EqY/9Z1Tp97dNvyZmeC7EQonZcCNvVderQ2WK3ZBQ3w1xD7vWOgFT2j4oGOkxBi1OaLMpYuDCOcZBChaJ1/bL+EZ6cirPZ4H479DfKbTF3BXbmryDhT5AVp9q2yw84Ino8nGtzblC8SqV7XO9ZVysi6ivbYDM2xI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707311293; c=relaxed/simple; bh=0yYe2isV4O+U0xGShILWSjk2puDw/sFjq7PGbppMq9o=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=eyyT7BN5VvTCRGuqcXX2iBYvearXTNzJiOLxEcW0qE/XtoHlz/89Zyf1mv1/9zu5IjPScNNZO3FmZJEPJRv0WdfldTdth1t8H+LMIEDH1USC9Kr8LT5h5aVbnBw4nZ2pcwYDQaTtV5XZv8o4A4EIoOSr/uB1shUt6N5oZ++gIQM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=pDLC+FLf; arc=none smtp.client-ip=209.85.219.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Received: by mail-qv1-f49.google.com with SMTP id 6a1803df08f44-68c4300518bso2902296d6.3 for ; Wed, 07 Feb 2024 05:08:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1707311291; x=1707916091; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TsvoQxJKgykHPmELvvoo0iWdxFiWSLC86SAFUlR5Bv0=; b=pDLC+FLfeJjrKP0bZJlF3ydUYL+1VI32q39fxVeqnHlVGTcbm/p0H6u4eteACwTVR4 OyvQR4SA6TLKMcLEk8nX4rtxRri2TcJFlzs8ztSm4Gb0o+VQG5BhLazzhVqfmjtDBuZE evYrPgrQgLNJ+e6Jfx6U+9kGf2ErptMA5/9UARZ3msRblIxG1NswpOtJ2+4k+3iLjvSo bnbfTKIWZL3bFV1LU5M6KOSIchinwEdaVGwlqU24XLUC6s2jbzsGE+D1HMqA6viZfGMA gjc+puOmtamXE4aT/R6R+vYuZubUxbAtT85RhwWrhXBH9CFbJXf5D4UOwVhb4RHEuhSg K6MA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707311291; x=1707916091; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TsvoQxJKgykHPmELvvoo0iWdxFiWSLC86SAFUlR5Bv0=; b=KNydbmFNso++RQRCej1fbqaTvy4tC/sV546b2gyHUM/BLRvOfCPt9DQgZP1rgCNP9Y +9R0SG6QtgLaCGTAiVxRcWTNLxAyamV5mIWrO/seH3+GJBdWYgZHNS+xHz/+MgOkj0vV PD9tB7KE9KxvUvENIMFnLUGqITibhLFyVNBuVZnDpyJ6tPWMr06JiXKjbHfmyasWPtYQ S+65oEvOb7Gn9L6bhxvWwuDrMvOj5ZdtQSK15qdD2tHyfBssOe6AuPglXPepgyTM8rui Y+cRsdHi3E0lID6JnyR1f5pQSr2cPSZc5XATOfQVACPLEGXIMqe9xobxE5K0LgZJYVvq IIZQ== X-Gm-Message-State: AOJu0YyoWhK2bRT7Yne9uBn7B5Fi0iPwdUksb0fm8y+IGFukUDi41Tl/ sSErlltEsz7nW02EoiGhqQ1nke5qVQYWoitWD4QU37LrCwnPwr6hnrQOBVH8h7PFSUTkYA7zQcj a X-Received: by 2002:a05:6214:29c9:b0:68c:a6e3:4db9 with SMTP id gh9-20020a05621429c900b0068ca6e34db9mr7021485qvb.57.1707311290933; Wed, 07 Feb 2024 05:08:10 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXhGi7Rh/av6SAxjEZKo61ucV9ac9cE013IgHnUT4qbvYPO/o69rvKfzj1nKmYnBh8eIVWtftlmXfIWJiCfr1aNYD9mdnotCXqzvfRj11Qu5GtbQGS2R3qjMHxcV05DnGUZr+IcIL7i4fSwT8tAHbGoMe8i250QKEoCLy2IZYe+8TYDFbGF7uT1XG5BypZ93el7z68uGlVO4iiJd+QfgviHPhu3lpmKcx2izAe8gpj6Mc75aPG5+90qFBd3fEY8tNQkz4Jo700Qfz8W5hXb/cEQuakWWHYHHJW18eqOczNyWF4+BQP+HTl0TmPUFbLop0AXSy/yEOQGjbtcg5ayW42KUBUiYHKFmiaSaMjNw0bxrfEHCWJvOSPax8s6oBiQB6YlNNfK1VGeKSenb0Qa3t7FZyL1HfxryV0kDXXAOMeyqbPh7KxtNTEuTfbmSGYqzr7bmyv14GlwHzVlE6OeX7XnRuqSDv+d1JMQdar43tFGSqgREyjVBV5Vq2Ji4B1rpdYH9E8TuxlGWA== Received: from claudiu-X670E-Pro-RS.. ([82.78.167.114]) by smtp.gmail.com with ESMTPSA id a17-20020a0ca991000000b0068c9cd2cf88sm565455qvb.60.2024.02.07.05.08.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 05:08:10 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: wim@linux-watchdog.org, linux@roeck-us.net, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, p.zabel@pengutronix.de, geert+renesas@glider.be, magnus.damm@gmail.com, biju.das.jz@bp.renesas.com Cc: linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, claudiu.beznea@tuxon.dev, Claudiu Beznea Subject: [PATCH v5 4/9] watchdog: rzg2l_wdt: Check return status of pm_runtime_put() Date: Wed, 7 Feb 2024 15:07:40 +0200 Message-Id: <20240207130745.1783198-5-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240207130745.1783198-1-claudiu.beznea.uj@bp.renesas.com> References: <20240207130745.1783198-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Claudiu Beznea 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 --- Changes in v5: - none Changes in v4: - none Changes in v3: - none Changes in v2: - propagate the return code of rzg2l_wdt_stop() to it's callers 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 d87d4f50180c..7bce093316c4 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.39.2