Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9090814pxu; Mon, 28 Dec 2020 06:24:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJypm8Gtn+n1B6bGGNKuGxbxVk8XQX+nxEV0OiGpztUbUHA9yykpAnCB5PJ9fX0+8Y21O7q/ X-Received: by 2002:a17:907:20b5:: with SMTP id pw21mr43424309ejb.494.1609165487896; Mon, 28 Dec 2020 06:24:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609165487; cv=none; d=google.com; s=arc-20160816; b=ZJmbz/JWWSqXCJDbHev6zr45xkEbhp0TCGEMEU+5RpE0GmFViclQ4bhLAUKOjA4wCQ SQHOyIYT6Tal419Cna1FtvJUB2J/RU88iQCaS9bAJMpFxe10T96pGl3XY6vLPrXtOdRY AuzB9En0lLXZaItv5FEYkkIyn8RrJNaBK/Dga1ABE6gFQhGvg4dckESKqV+iE72K1Mjh LIkvsZ0vYyRyvDUxzipXkNuBDwHdXddcHruVwOcqCWhqtxbUbP5jLUfwBMY9bbaFABEg +AjFPKUsIEIQvPCz5REBRzOqMk2276bTxb9H6fd/I0b32btqVMEyK6XUhNCP7ChFjc0U 9zoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=HyvubnSULVB0JYpovUizYr3MQq1eqDtYm276nTdaJQ8=; b=gcSRNyb9eGo7bMkiNr708eHi+RfZV5BLm5Y4KqkARllYcPEUUudJvbJ9/h+oP05ylV lYv4wF8BEVkIvk0FKxMQc0w++uzoB/NALjydyAPj+37Rln8tLPO+cOlOVDkksNB9XHF5 DZGdCbIX6Zv08+JAqhYo9uMLdcCdcd/Drm/rAblM4AlRIXEjO6vMB1EpS3aUiH+/GAaS BggM0EVlQOx6+QhAUKoVlW8KIVEPHNteqQOkqY0hJnzKFzS/MHdwjS4CvlIkssawRUiZ 8N2taCQlmFvHMNO8pOO/Jy33DPTGfgq/tqU6VUGmGPHIsu6bTyY3nrewxQVcvo5M1+69 TNFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kgPggfKS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b6si23836965edu.567.2020.12.28.06.24.24; Mon, 28 Dec 2020 06:24:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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=@linuxfoundation.org header.s=korg header.b=kgPggfKS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2441649AbgL1OTd (ORCPT + 99 others); Mon, 28 Dec 2020 09:19:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:54352 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2440677AbgL1OT2 (ORCPT ); Mon, 28 Dec 2020 09:19:28 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1E95620791; Mon, 28 Dec 2020 14:19:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609165152; bh=C4Vspwt1iBhs04ZgSjdE9/sf0p9HMj2D5pe5BswkYc4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kgPggfKSH6DYieCtMw6lR2nZo4eeHnzuQHWtqC6SxGmo7k6GHzqzAFqCLu8zNhOys rDVbOUoAKYk+8aPwfe/danS9DxcKNgIWA92V/KSlhSRJBvVcLsEPd2drKeS2GpErSg zlrefstXIW1FpXVd8HB73USPOr9RLfROsLT8Y5OM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lingling Xu , Chunyan Zhang , Guenter Roeck , Wim Van Sebroeck , Sasha Levin Subject: [PATCH 5.10 430/717] watchdog: sprd: remove watchdog disable from resume fail path Date: Mon, 28 Dec 2020 13:47:08 +0100 Message-Id: <20201228125041.568891057@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lingling Xu [ Upstream commit f61a59acb462840bebcc192f754fe71b6a16ff99 ] sprd_wdt_start() would return fail if the loading operation is not completed in a certain time, disabling watchdog for that case would probably cause the kernel crash when kick watchdog later, that's too bad, so remove the watchdog disable operation for the fail case to make sure other parts in the kernel can run normally. [ chunyan: Massaged changelog ] Fixes: 477603467009 ("watchdog: Add Spreadtrum watchdog driver") Signed-off-by: Lingling Xu Signed-off-by: Chunyan Zhang Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20201029023933.24548-2-zhang.lyra@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Signed-off-by: Sasha Levin --- drivers/watchdog/sprd_wdt.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/watchdog/sprd_wdt.c b/drivers/watchdog/sprd_wdt.c index 65cb55f3916fc..f3c90b4afead1 100644 --- a/drivers/watchdog/sprd_wdt.c +++ b/drivers/watchdog/sprd_wdt.c @@ -345,15 +345,10 @@ static int __maybe_unused sprd_wdt_pm_resume(struct device *dev) if (ret) return ret; - if (watchdog_active(&wdt->wdd)) { + if (watchdog_active(&wdt->wdd)) ret = sprd_wdt_start(&wdt->wdd); - if (ret) { - sprd_wdt_disable(wdt); - return ret; - } - } - return 0; + return ret; } static const struct dev_pm_ops sprd_wdt_pm_ops = { -- 2.27.0