From patchwork Fri Jul 3 12:04:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 229077 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp2328505ilg; Fri, 3 Jul 2020 05:06:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJj1c4ivJWaWpaeS/y5E8aPHSUKJkK/1P6vN7zMaUB+K3BFQjINUbJlr0uC1idnYPbGkuj X-Received: by 2002:a17:906:a242:: with SMTP id bi2mr27006407ejb.243.1593777993872; Fri, 03 Jul 2020 05:06:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593777993; cv=none; d=google.com; s=arc-20160816; b=UHUiC+31oT7Hkc9fbCOwbdg4xM5CjCLR9BV9R+9b8F5E6Vp4oSyVCUcKVOOUpBFTa1 uXy4m5CasuD6Cfas+itZvvcpKyf6mMM+4C5OP3DJ7qJzv/SIz/ii/wogzpZ01MgrtWxd 6j4JNPMSvL5ywfw1AkRNyQqwnAL8UCg665GfsNBGzESUViOVgM6lLK4hDjLsOlDsZDsm I0+iLS77p35iti7Ms7//wfNucho0l4M87pfD4KQflF5V1rwNoYlbOIdsk6JumpNDjWfr ZQjXxsQIF21qxVZRNXzAFpSjyws4Wp0cmW2McQc7qJo6X4MGXHishm0pbK9zd1icobRg 4CFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=yErUdsaQq1DKXS4cIgWJyC1B7C7lxDSI9EbVYJz4ysc=; b=fpxyWT5V6ylKgEf0N77F/nd5aFInUCTnwYpWbePFLdWXqZfGTByUOzhBK7GKcfxB9g +IlxgyzJKLogJoHO2vVlJSwAIjPSI5sBbkQbUUUfSUSvFEDY7j1w5PhsajnYi1+VokBF daNk+pB4anU4XGJNX9a2uQ5Sik2hGo+NyifCTtQNmX5AkviAVOGFDV9X6lDPRNKlaxAs fI1SES+C7GE+p09KmTiIRpjvQzP1ZdHkxtWy72zLVCr/9UdgKerEdKPhLtUqihjATHT5 /hBwUgYLkcMfqPb6QrOW0N0F895/sTRqfdFFg6759LyZCFLGBmyJBZdFjMmD0PtTg1HS wn+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=VGlo6T2w; spf=pass (google.com: domain of linux-watchdog-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-watchdog-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c25si7550692ejd.178.2020.07.03.05.06.33 for ; Fri, 03 Jul 2020 05:06:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-watchdog-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=VGlo6T2w; spf=pass (google.com: domain of linux-watchdog-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-watchdog-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726353AbgGCMGd (ORCPT ); Fri, 3 Jul 2020 08:06:33 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:38622 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726147AbgGCMGd (ORCPT ); Fri, 3 Jul 2020 08:06:33 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 063C4Qo9060614; Fri, 3 Jul 2020 07:04:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1593777866; bh=yErUdsaQq1DKXS4cIgWJyC1B7C7lxDSI9EbVYJz4ysc=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=VGlo6T2wwJMA5CfjQlpalll3QXV43UhUY6sP9jtb2MqG/lWkRK34lRsWmTcwoib2r u0VjP1ZcYiuPNJl7eFPKDq8gTAv65mOQPuJfiKQBwYZKE2emDFx8rSuvSh6o/GYNVc rHBp//bAVYRNqy4qOCuIp3o0qiS+AbTCPweNDuvk= Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 063C4QcC078799 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 3 Jul 2020 07:04:26 -0500 Received: from DLEE114.ent.ti.com (157.170.170.25) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Fri, 3 Jul 2020 07:04:25 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Fri, 3 Jul 2020 07:04:25 -0500 Received: from sokoban.bb.dnainternet.fi (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 063C4Fkj109800; Fri, 3 Jul 2020 07:04:24 -0500 From: Tero Kristo To: , , CC: , Subject: [PATCHv2 5/5] watchdog: rti-wdt: balance pm runtime enable calls Date: Fri, 3 Jul 2020 15:04:06 +0300 Message-ID: <20200703120406.7092-6-t-kristo@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200703120406.7092-1-t-kristo@ti.com> References: <20200703120406.7092-1-t-kristo@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-watchdog-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org PM runtime should be disabled in the fail path of probe and when the driver is removed. Fixes: 2d63908bdbfb ("watchdog: Add K3 RTI watchdog support") Signed-off-by: Tero Kristo --- drivers/watchdog/rti_wdt.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.17.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki Reviewed-by: Guenter Roeck diff --git a/drivers/watchdog/rti_wdt.c b/drivers/watchdog/rti_wdt.c index 987e5a798cb4..7007445da80b 100644 --- a/drivers/watchdog/rti_wdt.c +++ b/drivers/watchdog/rti_wdt.c @@ -304,6 +304,7 @@ static int rti_wdt_probe(struct platform_device *pdev) err_iomap: pm_runtime_put_sync(&pdev->dev); + pm_runtime_disable(&pdev->dev); return ret; } @@ -314,6 +315,7 @@ static int rti_wdt_remove(struct platform_device *pdev) watchdog_unregister_device(&wdt->wdd); pm_runtime_put(&pdev->dev); + pm_runtime_disable(&pdev->dev); return 0; }