Message ID | 20240202075849.3422380-4-claudiu.beznea.uj@bp.renesas.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-49397-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:9bc1:b0:106:209c:c626 with SMTP id op1csp926063dyc; Sat, 3 Feb 2024 01:16:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IGbnHYDbiAVFKOfrLNnsUeKILTCTiuoZ9jwz4XuUvNH4EdinmxQa+590XjM833be5NhzfX6 X-Received: by 2002:a05:620a:1443:b0:783:df10:a0e5 with SMTP id i3-20020a05620a144300b00783df10a0e5mr8783856qkl.73.1706951769515; Sat, 03 Feb 2024 01:16:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706951769; cv=pass; d=google.com; s=arc-20160816; b=gkVzQ/LiCYHEJP0PNQ+PMdGY/xqwCUoSN65dI2xJUnXxbXCfmNMNQevP9fNPNoSiT3 2wQi8IzfMbNeLhQrgv7uiXa65sqqDFB7repw47KhfI1y4ommZM4PjQGMVMH/MBLwJ+ld IH3JoyheNYdF6ISJQWM+VM//BfvSyczgIvgPIoBfxDHCPEgkYvNrDzk5LHNzlN2U9lfc u3iYctmDGPPnsplz1ldwGR5qnqMHP8FP45QLAC4Clbc81vMRwonz555DghyUbOcYvUTH YPnTo+hdurP49Xpbg2KVWQhwpXu9I+hRmPsCChz2ZI3VcxQ7Izw4noSGfJxVVuOigqaM qE+g== 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=E28h8UOWdGbHYCD2Q/GcdEN9vZw1F8khK8fuudVwako=; fh=FYepyPYIJAnyRVOj0BmApjbOmerGPgiGwRGgVlIRzAM=; b=LJ+Dxv5i7N4gKjnsFixIOgIDYYak4urkBZOIFEwdRkh4hoMoPrRv2E2u0S6VN6th7Y HqPbPhm90MGi0+F2PR9xJYl4Kg27FVoTe+nFum26I/EWDedKrBvpie35bWkijPNeZxVJ LK6gkUyEmVZG172tqFV5Fe/bpFs3n2GKPbN1PPKsmGvVTg+qHYThdQve+6qU+k4HcIrj RY33cXuaGMLxbwjCcBiR9YGVIgL2/wjubh0ZqPURPrJU3gpF1dQTAFJdSUB5nb37HMRr xo8+cBCd+QLRJSYOrPW9Vpxdsa+VT1E3VGtk1vXi1YoQ9cHPSwSMCDLdgNnlxCDkiO+O IcHw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=go0oeR3l; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-49397-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49397-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCXXjlTXJlN+Yed5PLJUI3hmFEA72H6Tkmmhh4g/jyhzAho39SXQvc5qRIcuJ9nkRJVfdTx+LEiGc9jFXd5E3Os8Sx5t8Q== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id h26-20020a05620a21da00b00783df0a604dsi4032976qka.533.2024.02.03.01.16.09 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 01:16:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49397-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=go0oeR3l; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-49397-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49397-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id F088E1C28A7B for <ouuuleilei@gmail.com>; Fri, 2 Feb 2024 08:00:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D62D7199A2; Fri, 2 Feb 2024 07:59:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="go0oeR3l" Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.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 AC34318046 for <linux-kernel@vger.kernel.org>; Fri, 2 Feb 2024 07:59:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706860748; cv=none; b=J7eqLLXCWn8tJLGl+BitplxY0/gNngRPJeYAfSnhvTKicNaN7DA01vEemisaIrqnC8biA2zPc4iBA+VuXUKYldU2nat5CibJJfwcGPsFty4BVjpDl9E0PSqjRcCxyCMQiXU86+tZjuD3zYdbkhoaVwrrMlAhOte2Zbyob91jH2I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706860748; c=relaxed/simple; bh=CWt9OYHw/poJzADJ9gjXdNYtv1VEWdyf3zZw14VJsuE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=LsGHqlzCHKbotDQS/SjNaCxXrMxI5wTkguJn3B+i2Z0/GTpGs4wOXozVnrKGodzph8XYvsbEBS1ROkwKOBl4rxNJ9n3EXMM3QggPd93dBuUxowaivWlpSX1u2aXC/e0gnF2YP7kaNRGi0Ph1YMlFXJd/e6i4JMr+NFpj67u/cTY= 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=go0oeR3l; arc=none smtp.client-ip=209.85.218.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-ej1-f47.google.com with SMTP id a640c23a62f3a-a3604697d63so273375866b.3 for <linux-kernel@vger.kernel.org>; Thu, 01 Feb 2024 23:59:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1706860744; x=1707465544; 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=E28h8UOWdGbHYCD2Q/GcdEN9vZw1F8khK8fuudVwako=; b=go0oeR3lV/vh7kY2f0bhFnUG+9aY+y+KXz97Q8i7p21w079dad7qhH6een3YE88f++ wGu1K6tkx1NAJ2XbQY/W0zYlQyJWhOizEbErsToz0e07UKI1NcS0EKxd/IjZVPS9PWeM alvdWwFV+kdSNQWv/LYIj9qgeOD0WSwV2uBz4ruq2UaENHwpvK3M7Wkxs1cCPKwSSaoV J2uDzln+yJIvdPOXGEFV6Tc5y13UIhqqmNA3moINT9nU6cCi4VUk9bvWF6RrJBIdUtvj cGqjp/KfJcfrC1omrFPl5NWEKXibh/43DVJOLTqKphTX/4lY0zTn0BKbRj8ygY20zu/b H8rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706860744; x=1707465544; 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=E28h8UOWdGbHYCD2Q/GcdEN9vZw1F8khK8fuudVwako=; b=oxRBt34nfO15a+Iwgv053L9jzOAz5DgkeG4/pd27CYlQlZYPFRRP4e8VvOumKEi1xH HuNiZE1QwwE4UN/pm3v6sJhfA2Evi1M0oUls8VTpTJEj6d2yspiTMPFxYpTJpuAozKqV bakpEfC2ZUGjmPw9fx2G9pqwu/sl4vXTERNqrDA8LPitDZvYdQwy6Tr7n7AIeEUqhsFe WI3oAO77l+IVaYB2h9J01JgtUxW82jV6sRHxhV5ZJhg8aTzGlt7tV2EW3A4Wv9VTZ/fm Al6jXthmG7dhsPK5N5AEsZpOuWCmFQWmoNsM0Uoh8arsJZWCxGpY5ysSXjKOvW9OiPA/ dAgw== X-Gm-Message-State: AOJu0YweNqbatg9KumfsZUURmN0K2CiBzMtK4h80zhq/HeuSrhM9jvAb fYtwYZevUk0fVF+4jD7eO3iOJrlOuuN0kJfQ/eS8DyGNEorNNSBhjv9Ndwv5S4Q= X-Received: by 2002:a17:906:1c2:b0:a36:fc15:c6d2 with SMTP id 2-20020a17090601c200b00a36fc15c6d2mr826777ejj.5.1706860744034; Thu, 01 Feb 2024 23:59:04 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVix0ihpdOec/L7vK4fRSeO+izEcKXBhidmesrR3EXH0mVdoJMYbHVDQ0r2qyoHV4TbaippImQa7G2Ot8keg45J7cBHFWxWXSeFpv7K3UtK+aXAqfcwgjwW+zxxiqqUV8T+U7f+Zf1cONPlxvXW4hZZND+o8WAZQH6NUjUfzr1hft/IBNcLgojXSf0ijIc9+d0geEIxSiY4lCbF6Os+9n5nmwdWZ4v2vvKR9iIfVxj9xBkXcRkUDTa+jzcVKdTLRGerdWMHieXDWVgUR+WksZZlI3oeVqyTihdLk3A8fkbPdZ5r+/+9tIA+k06Yz+WrUKpz9f9LkQHK/kW3AvBEuSwywTdrRTLLsFrT4rsrqU588ujMnxWZw2Thk6mfh0xBDSJEUaN8VX7xr51C29LniFzB9U6TrqSWJgXyIPHG8+KF+WEeS2oXposmP9+xydCMVeOMswrTS7UguM07U0XgHvuVDWCWWeg+2A3l0TPDmAnzI0rnxR64ClUhbLmOQlTLC2RGn8wtM6gzig== Received: from claudiu-X670E-Pro-RS.. ([82.78.167.87]) by smtp.gmail.com with ESMTPSA id ty13-20020a170907c70d00b00a3715be38c4sm185544ejc.210.2024.02.01.23.59.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 23:59:03 -0800 (PST) From: Claudiu <claudiu.beznea@tuxon.dev> X-Google-Original-From: Claudiu <claudiu.beznea.uj@bp.renesas.com> 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 <claudiu.beznea.uj@bp.renesas.com> Subject: [PATCH v3 3/8] watchdog: rzg2l_wdt: Check return status of pm_runtime_put() Date: Fri, 2 Feb 2024 09:58:44 +0200 Message-Id: <20240202075849.3422380-4-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240202075849.3422380-1-claudiu.beznea.uj@bp.renesas.com> References: <20240202075849.3422380-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789868658298198904 X-GMAIL-MSGID: 1789868658298198904 |
Series |
watchdog: rzg2l_wdt: Add support for RZ/G3S
|
|
Commit Message
claudiu beznea
Feb. 2, 2024, 7:58 a.m. UTC
From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> 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 <claudiu.beznea.uj@bp.renesas.com> --- 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); }