From patchwork Wed Feb 7 13:07:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: claudiu beznea X-Patchwork-Id: 197925 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp2214256dyb; Wed, 7 Feb 2024 05:09:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IHa+uwxtvcSgvH3xzALLiCMt60eGt7SCV5O/jkRXZZNBAAId6SrWFSNzrIWZq7oqLE5LrxM X-Received: by 2002:a2e:b60a:0:b0:2d0:a6ef:651d with SMTP id r10-20020a2eb60a000000b002d0a6ef651dmr3596442ljn.47.1707311360987; Wed, 07 Feb 2024 05:09:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707311360; cv=pass; d=google.com; s=arc-20160816; b=QTSHJ1F+GR9mywyCGPTihK964+h+C+bIAEf0Yneg/4PNj6YntyxXT6vAc0Qle4mmj0 jsbca4XbSdBLJl4yDhCA/bT/0tpOydOj4rgqKrec8SfWPgKTI7DAvp/jGii7BgtTKUGQ P/dxrZ999rhR7x/cPztPDHnK+R1qzfccnMFX77C4YxIjjttPENN+m5hptUtb4Vgt8twx FPuEdKmKe7jDd0kKdrU0vqn//5XjGRlUZKcOZmLsYbYgtxr4an2jqGXgQDDHrLCDu+xh OSbObWbOeI8zFvxg2booP6leJKpAOlON0QttL3HF3QkGYahcgw+7MvHrEzg7rJ/WO3z8 3fuA== 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=cT7U86jikwgsVAHCyZOvyYuVD05KHdbsrvR8YbAyJq4=; b=nrePVWgCA3u0wu+01jVlJC9Tb5+Ey8H2AvLZmvEGwdJtXh6qRKPAzW07TcrMp/ag+s Td8PXm94+faNoHjij7dwfHvAd+UvBUli/oOgVnlUBFWS8pzrjT0uxbhXxzBy46hSzS8m AGNwbW/vTmP09PknJjny3BB42RGWEub0nXGsmyrVoBfNHMN54PUrIuEoRVOW5mn8cUGi Jk6gW0CYXxKzUKcUx5WyBQpjGCPLg6QB1KA+HLJlVe8YVchkocJMOK1oB1MiK5v2RE6L qZWEh2OP1ZkB8cG4fCEjHM7iIhu3pFPV5o8ZRBxA+seUpy69a8JEd965WEIfTdkOYv9B jVWA==; 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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56513-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCXqIF/1X5Bmux1YK1p/5HCXKtvdXifK8gypiZqWPMhEuN/nw6ir5lMKevBA6MByTcEyEjzVap/D2plVXCSYEuz7iBe9ZQ== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id w3-20020a50d783000000b0055f27dea051si833157edi.347.2024.02.07.05.09.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 05:09:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-56513-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; 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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56513-ouuuleilei=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 am.mirrors.kernel.org (Postfix) with ESMTPS id 953631F25713 for ; Wed, 7 Feb 2024 13:09:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A8E0976C7C; Wed, 7 Feb 2024 13:08:16 +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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790245717329491046 X-GMAIL-MSGID: 1790245717329491046 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); }