Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp223972rdb; Thu, 8 Feb 2024 04:21:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IGwqtxGTAv0yhzaUaJFeQw9bXu3T788vS1k/DMuvSMdNv7vfP+KgoqN9T0W0ulIS1BJDF5k X-Received: by 2002:a05:6402:695:b0:560:9267:95af with SMTP id f21-20020a056402069500b00560926795afmr5805860edy.22.1707394912428; Thu, 08 Feb 2024 04:21:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707394912; cv=pass; d=google.com; s=arc-20160816; b=wOntDvGS3OP2LVA09ibtU4BiAZoE6YdAznE00NwU0jEWaFh/MG5Ql6ZTX4xw4vtMDt cDoK6oSK7klesGMFwMxq4s/Zoycwdi7IoBDyYr8mUC5stM1JfzVDBjOvJPF9T21qhWZz rlUbS788Vr4smaq1u6SuI7yFcfCkmUIziGCuWV2FRyR0xegafnOw2XJqIFChKKP5RpC2 gc6zUba0JiBD6JX/1ijlc41jgcY7z5DcIcH1MgDZTtZtm4RDnlpAj2EGDX1ZY9cBq2Bc N8djT9bDHWSFtLbZRCELcteRM6BXYmqme3RUqyC9dYln6w1rWb4Tj/pdKpIIGSBhAeNh 00BQ== 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=0DI1IV6Rx3uk2FbsWFVokMdXowmYpvscOLMsi3FnGC0=; fh=4EtryKO9vG0gym01E0ymmtaR23DDwuy7oHKjTSVf86M=; b=lDuwMcUkm0Tc44tIJEJFNwmPcGCgAN4D0AUkhEqmJVp14aT9C0MGqh0z3NSlTNxTDM wI1NqTHwbGI81V4/O39y+QYFJjLmA+c4sTOedNYwqrdlztRLqIX00Sw0TtxKlqCW6uaN CVxxWr3wheOWhqwuqgyf4pNFf9LmYPwwk8nlSyOzY2I67ahGP76O9hD9ujHAdWfV2eLG 3L4lF1y5HpzvlsSTkWexsYSF0PXlaSyBS6WdbzI4jQLEQcipRWqXCkzylJgAlOEhK5hw oMEu0VcpwlLHnO3/Ssb6Q6atxKcXKwvg+waKdYyoZw8XvRmOfikLPvD/tSJaB10zHmxb zH7w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=p74UzNjm; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-57934-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57934-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCXFJsh//cwxSj8YkbkDOlO6I4DNZb/deOzBcyqYnnWQ/0U8U2FgXP4xY/L9MQ7ofGYAc66xV7jb/i0xKQGaiby+Bo5vkfNZ1T6bC4alnQ== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id c20-20020a50d654000000b0055fb5939791si867589edj.567.2024.02.08.04.21.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 04:21:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-57934-linux.lists.archive=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=p74UzNjm; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-57934-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57934-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 6F1851F2AB3B for ; Thu, 8 Feb 2024 11:05:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DC14F76C96; Thu, 8 Feb 2024 10:58:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="p74UzNjm" Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) (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 05AC27604E for ; Thu, 8 Feb 2024 10:58:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707389912; cv=none; b=DcuCGpEPSmkaYh+UlnjUWJStmwZ6fb4z2Ki0mtHffgdgWe5tGYTFqEC/+NbTrcckhubTq5h/DCQK+oyqDfszEP8jiAXNADik6OuRPN838o2rBisEbGOgwJO9I4TFw4hsEiBBYzOOlT4UKAbtdTC7XdGlx/IWI7808lQxobCi4SM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707389912; c=relaxed/simple; bh=TWnaLa0m7j4db3AEiePIG8TB6o+5sCCR0ZRalKhzgoc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=OedovjbgnzpbB+QuDcSoDTx/zgGSrZnAR3NZ6zJjAR6fLZ/pO49uaYBiAN74AkdFntJJcw+n2hrV6AgJN4yvmwEI4wH1oC472i69VYy9MnQEG/kIma4qtDc11ab2VUAyw9ayOAG+SmvUT/HJA50juF5sZvH6lLh4UG1OL2XU4H8= 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=p74UzNjm; arc=none smtp.client-ip=209.85.167.47 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-lf1-f47.google.com with SMTP id 2adb3069b0e04-51147d0abd1so1973740e87.1 for ; Thu, 08 Feb 2024 02:58:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1707389909; x=1707994709; 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=0DI1IV6Rx3uk2FbsWFVokMdXowmYpvscOLMsi3FnGC0=; b=p74UzNjmBP7jUj4amh18LwDXQ6FRmrXLiPU8bxa6fzyk/7DjDGxqnSmMak94+cU0AA 5LkQXS0Rb7AZEoSRknjZqytEhV+M5eUolIAPLMyaraS5a8/SWpnM1kp8ztTT1u7hA3Ao jOFWGkqRXGipsgxY1TKMPLu7d2yIww2jLyKeCpeEXrkkqrT4G8AOp5x8CNe7/PGVcHby 3y8JcReGbkmiz647hE/Z+c9Cm13DTGjvTPWS98ck7+ODbbLRYHIVckaWNIlUIG0LdJr0 gXg/gObWgy2Dq0UmRz7QRXikB09HdBMUrbGVOM4LKSa2l/XwyAtqFHJPAYtQZzrOtz1A ZAxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707389909; x=1707994709; 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=0DI1IV6Rx3uk2FbsWFVokMdXowmYpvscOLMsi3FnGC0=; b=cJPYhKvqqLuNtkU1ctv4sbmWCT1nhMC6K5hiZQCWpISrdK3ZVLdA5CUbqz1BWvh5T1 oCHVxGy/hzgFPQxdMO6gN/NbNOD0iOeT/bSzq4ENhSjk5gRXsTCt29QjPpw1OdC+/f8i vXzbhMXyqTn6l+6pi8gIRzGO/ixJ9UKvWAO7j3RIRBN3cC91rL/CmRnX//FxA1uXBMyj jBtLH4ECV4flHHoVAnbbxS8/QqlL7W6Pss0GUgVMJXuaOiSaRFM+GCD3cwEAIxEl5pXe HPemKGtRy+8dZ6gQIQ9wUtxtO/jNlKFu6z4b35c9LbBYK1jHbrR2JG4lm9JREq2lRt5w +MXw== X-Gm-Message-State: AOJu0Yw3ErmmyJwqjQakAMFHfU+mdC1Iqmf+B9XVozlC5j5xrT/nWwPk QARS6N0mV0DTgCE7rB9sBn6f/kzPwH8gCmo66Shghe9IcX692UI9t/i1k0E5Xmg= X-Received: by 2002:a05:6512:3b8b:b0:511:6ec9:d380 with SMTP id g11-20020a0565123b8b00b005116ec9d380mr1211968lfv.30.1707389908975; Thu, 08 Feb 2024 02:58:28 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCW7lOUQxgPEN2hTmCLvI92dF/9IYH1BUNLprXQj+N3P49eQ9Xzo+cu2Si1IPz3FerY2IAjhIV3ZlGdA3YnVqo5H9UNFkBk0yLCccoyfWGXf4TgPZzU9OTHd40JIJIVVnQ0QmJIzR1ZamVWrzbC+Cofey1Jm899GaN6V8YmF2bFSHynfr+2tDzb6rcjPYRp255xUDG0762YqzfJPLdyKiJnyvD+mVbyKNJ4ngV0rLFLS08oQV6lHQ/DmR9/nukFQWzpINKumanhhY49n1wyUasp0BI0/J87BUC/aMl/E1j2X6DkKK7vnX1UsrOX7FfC9CU4yQSBJj5ix23+UFGd7x3KnsQGVnZe/GOZ6i4WYWpfN0Vrrq6lnI34cXEdpTJz3HoGFjxTTJbPYj/Wy7Cef+/VdCtdRm+t4vWHMAUnlstlSLpz1l7lfgFXO9jgdCBdyfC3BGiMSycNITNrpQrlxrhP8R719n1pR7+AbAg4zp66iucX5Az3dpLSTSFCemVNPa+Zq3xccRPQkKg== Received: from claudiu-X670E-Pro-RS.. ([82.78.167.45]) by smtp.gmail.com with ESMTPSA id a6-20020adffac6000000b0033b4a52bfbfsm3344153wrs.57.2024.02.08.02.58.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 02:58:28 -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 v6 4/9] watchdog: rzg2l_wdt: Check return status of pm_runtime_put() Date: Thu, 8 Feb 2024 12:58:12 +0200 Message-Id: <20240208105817.2619703-5-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240208105817.2619703-1-claudiu.beznea.uj@bp.renesas.com> References: <20240208105817.2619703-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 v6: - none 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