Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp293703lqh; Fri, 31 May 2024 01:11:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUMtYQsWBlCFctJ9kBq1Rht8YI+DN3rKT94QePlSQYOyXLgBp25J68abetQu8Z6r4cchGRmLbU5y0tzjYIHGJI//u6ZbumMqOazgKoKog== X-Google-Smtp-Source: AGHT+IGVIcKDBLJKOeCCJkFh5AIgWCvOJ343Ikv4VFOrbquzu+fxLxc7z1OYwuxShqP9EZuST4nV X-Received: by 2002:a05:6a00:182a:b0:702:2d79:f4e4 with SMTP id d2e1a72fcca58-702477e87c0mr1468950b3a.13.1717143085507; Fri, 31 May 2024 01:11:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717143085; cv=pass; d=google.com; s=arc-20160816; b=D4N4HDiIhKU1dMhL+Iyxa0aF8vHGk/3CqF8N1JzybtTOaErredM3/xE/bg6i9ERO3L YOc7FTYi5SGRMpS/LOUm8fzwdTrjB2vliv+xQ6aPrD8K3SsNEZAAJX4MYktZcP9X4QQX yRKPCqS/LSpsnAjWb7ubOZpAu//YeWCSwN/GDCUS2ZJf1I0KgRRwAbpUpSTLR6g0gh9U TE6dq1Ss6DxGdYgksM1XPSu8H1ivm1tBc5SaKhdupI0xdUjFFXzYoAZI1IAm6982A67w yPlvfahk9QWc7FuIyO/40io9RCfVVFXiSbVrCeqja6IV6gRSJMbUqIVrexaIkkiIfWXG Uqsg== 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=x0Eevik2IYxzref1KJgFO0IRFSiURPphRwX/prtBFDU=; fh=YhmdVhk7zlWRIVscqMVx5D4vvlHojrIYCiZwQ8z2q/Q=; b=lwcZ2DMWinYTUeaeE7WLS4FbqyLCxds6Qpz44QSlIyun7V5kQ2ZsmNfiLlJwdgWvar L7TmG8kj2ecQVK2JxmO5RD/H3sc7lPNN1imkBbb6wa+nc0Th1fIobEsSfZSjphcbQfLD i612/7DGn29+IH+Ig7gDNifkY+MpeJsAeruAZArg/GKqDHD0cvCvg4wFU+JsCx7PLD+P 9DdHxau+0Gv3uMJMKTD2GnWokLoOzkseor5RVxUVRcVizltgHvw6VAwj1k+3quQBqN00 MGrSFL0l8Un2Hqx7qRas1NJ00fBGVRq6YtPOYlHi1JaR/7xkqWn2HttMLEkHUhWjmpGD hM+w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=EVTqdvM4; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-196379-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196379-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-70242c293a1si1110056b3a.243.2024.05.31.01.11.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 01:11:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-196379-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=EVTqdvM4; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-196379-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196379-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 1C39CB24BD1 for ; Fri, 31 May 2024 06:58:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BDF56824A6; Fri, 31 May 2024 06:57:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="EVTqdvM4" Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) (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 591BC81ADB for ; Fri, 31 May 2024 06:57:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717138677; cv=none; b=KvtiZbCNoo1W6ukfqJOlNQd/HHtnvmemrero75w09Yb9hJlUDRgwO0vTrhAuKy9TMijTK8Os0+QaLaPmjTDNT5VuGRYgxgQnMSyyHq8NGM/qT9T8jtDRguVW+k4ZZAvqhMCP9QdMohD5xFg2t+AC+mq4cTcT8hR5aCUufo5PaZc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717138677; c=relaxed/simple; bh=0UGwaZRK6aHwnL5LePxRIXYhV7NVtqBcmBMKQs+sdqw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=EyYOg2VfknZ5cK2XemV3p/UkL5YnulLb+nzTrmMMdt4RrcH+FR4v00yJaxABvqvp1gv4xY11EEdruOrCtKHm12qsA8iMEe6Z/nSpmTOL3ue5wB2tziScKGR10fntyQCwNrafiSVrWdF+v+gJpaBl/AwzEhY2b1LOLs/JHoJmxDY= 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=EVTqdvM4; arc=none smtp.client-ip=209.85.167.42 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-f42.google.com with SMTP id 2adb3069b0e04-52b86cfcbcaso974530e87.1 for ; Thu, 30 May 2024 23:57:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1717138674; x=1717743474; 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=x0Eevik2IYxzref1KJgFO0IRFSiURPphRwX/prtBFDU=; b=EVTqdvM4tB4S/tCSPct7qRJUmLanwHxlA8sllUaEjhfZjDlOzzIENv432puIi3ykdc xOYuuQKwf5Tz9oiwzzgkjjEh8H1KicyrrclWpG74ECMWncnBC8uII2XVk2O/5lCJRCMf RU4I7FG3f7YKZWo8EJy2N+VraPSA+lfdFm8nKkcxS+2TzYhKq394fK/Km6bgnJ9zQcEY e1o0/7uQmqvmpA3uG0zvsURTgRhZ8rd7fNDckuG9wh+4J3Lls4YGS+rrjoPRe2f27TEq CYUGFqvr2Q4wA5Ycca7+72wZYSX//GBSPwho6Sow6Md8LtWSalrC4VlTP7gLMzPbjzKe mM+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717138674; x=1717743474; 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=x0Eevik2IYxzref1KJgFO0IRFSiURPphRwX/prtBFDU=; b=VxadT7Qg1sBdTqVkdv6H7RWRwqlyrSl5zKMdfdvu1Koct/qkcAr/sXowtcbW4aVL/H 7Lt+nHyX5ShPLIMQi18jHE1sGoA8tcopdTiDz/d5EPrxMtE40IWCTYHfh/IHqmKD+lho 1cb0I9mlKQwcyAU3+SDOdAFy6CoylwasOWf4cYYiEPRiPBiG5FF7FBb88/iozCoQP8nw STyQqqqEzlkYU+fll7xnXMoMPgnRgrl77beEtN8Ioat+hOGnwCxDYN4znm4LJONUrVK5 vxQyEFXD8D/o6H9mYH52uyS4BDfAzx02aBWYO3llsW/wtHKI+EgW3/QrdSkyTQgHB9ad IwFA== X-Forwarded-Encrypted: i=1; AJvYcCWi+Da+dejdh1TSZpQmT++iMosS+PgZPrcDWdCmuTa2iq49rLDOuzLrdNhwrtdfos3o1rQoPeh/Sxn/A7sK/q66B+Rf+BuBv0QXD948 X-Gm-Message-State: AOJu0YwXsKcDnlpUOvr+WNvDF7tEAHRO4edvH/UzLDhM3Y7n510WIh57 JvgkoBCEtZueDgTVHVdLeniUiB54n9RQHRvrkBci3jSX6y05Oshidl5fnj2Ftnxptcs09NKYiSn s2tQ= X-Received: by 2002:a05:6512:485a:b0:52b:86ad:26f0 with SMTP id 2adb3069b0e04-52b896b857fmr582996e87.67.1717138674499; Thu, 30 May 2024 23:57:54 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.157]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a67e73fc1a5sm54205566b.53.2024.05.30.23.57.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 23:57:54 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: wim@linux-watchdog.org, linux@roeck-us.net, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, p.zabel@pengutronix.de, geert+renesas@glider.be, magnus.damm@gmail.com Cc: biju.das.jz@bp.renesas.com, linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, claudiu.beznea.uj@bp.renesas.com Subject: [PATCH v9 4/9] watchdog: rzg2l_wdt: Check return status of pm_runtime_put() Date: Fri, 31 May 2024 09:57:18 +0300 Message-Id: <20240531065723.1085423-5-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240531065723.1085423-1-claudiu.beznea.uj@bp.renesas.com> References: <20240531065723.1085423-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 Reviewed-by: Guenter Roeck --- Changes in v9: - collected Guenter's Rb tag Changes in v8: - none Changes in v7: - none 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