Received: by 10.223.176.5 with SMTP id f5csp3654177wra; Mon, 29 Jan 2018 17:02:42 -0800 (PST) X-Google-Smtp-Source: AH8x226RJEeLTNPYMZ//aLMpkK8S098OogLqgppOvT9ZzAxSiflmk6Ryc10BH/XsgskuhhX6KL/7 X-Received: by 10.98.34.27 with SMTP id i27mr28225480pfi.43.1517274162089; Mon, 29 Jan 2018 17:02:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517274162; cv=none; d=google.com; s=arc-20160816; b=mCgql6fw30Kfplr991jLbhFG1NVdwPIWBYXoWzPqSn3XWKPNHVW0Fj7Y5OC+yrTb7y IwLX4FeTVRrxLBNRP1o3RvhTF/qDJ0gWQTV5FTA4rlpPaWB7foMsvKKRRUT3T4kQ1XvL wj2y5CgCZiUEfOpZj4sEW0WmZmaLec3Zgezvn8P21xphh/8T4f0nl1f7UxKWyalu/BHd 4u2t2bBu0kvSXcjTw0WiBJMIVAL0/H8fZHy91qPlQgNez8ZLmyrCX3hfs1QBnb7HMYOC JkyW47J7PrevQB6IA4Z0YFDIKXUA7rGYzcqPZ79PJiLtRkOUyG1CagfnrQSlMMAdRLtA xk7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=bXrIQAeaBj8ZTh2/1PI5C5HpC8c5NeqH4Hd9pU7SKRg=; b=CuFcCpCW6lciKShhtw4LsEIGWgHTPdJfg9oD/EalX7jeugsnoeeD1TjFc1/IUxFSFX GBKYD6cPkRJMswtEMIUBuayTlf3aUvhwLNQN9+mX0ZUu9meLY5UtojDwbXZIv+o373Vo JD2Ft9v8xE+4mPS5ClCondEBS8ltxoFy6ZxOZR0WrEg3VnwnTz4ktU0nK+dkIBFy65jn REDMe/KarJCD5STegZYyB8eqyFaxNHeCcEjLDMhHxivUuV+VrkGIOVsnbGRXCEhhWpjU qZ7kvWdt9kDLw4S+D2oZ4xhDcfk6l8lDJCn1phHNqqZ37E8Qs3+3GuIPR4LZYWr2OL4D SB/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=eExXK8tB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f71si8249863pgc.477.2018.01.29.17.02.27; Mon, 29 Jan 2018 17:02:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=eExXK8tB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752573AbeA3BB0 (ORCPT + 99 others); Mon, 29 Jan 2018 20:01:26 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:39619 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752302AbeA3BAS (ORCPT ); Mon, 29 Jan 2018 20:00:18 -0500 Received: by mail-pf0-f196.google.com with SMTP id e11so7073095pff.6 for ; Mon, 29 Jan 2018 17:00:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=bXrIQAeaBj8ZTh2/1PI5C5HpC8c5NeqH4Hd9pU7SKRg=; b=eExXK8tBPNuQ8cOjnVe0O62NOUrXBiXY/b0sC8KHV6MekJrGkHRERbXv1tyJDZK4Ce OfNdONB1v/4101bs/eJPqDyH2mNwuFG+rmEwskNeLgPevp/eIlI6hnYBqJNqR6y6+CaL EwpPcjcJSCE6dFJ6kKokJexB9gc5RB1TjYaKo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=bXrIQAeaBj8ZTh2/1PI5C5HpC8c5NeqH4Hd9pU7SKRg=; b=h6ZEuvx6S+GNP337za38uXtUKopcUZ4Bo/L/in1kyrMUJYneYlNE74rMv6kJJsjXCF f9iXyhNRKgVubQSjudxisRL1IgT8+pCi0cFX0K3McuSFsfbKExxWa9dkNhbXw5LSPvkQ MBdPljP96epoxfuD8gZemlrmNvkeKS5KbgGiQuYm37eWp/fzdm85CO00w7egovHyyErH 7CazXip/Yru0FvGNTsR1nalrHrIqqAID5qjhKaNg28M+SnazZNceAFf4T5rpkwX+cdXo ORhFXBNMDJ17LWiD7ouY9WsD+AQsOqsrfcnT7z7+cHhxXV5Ml8XRIfasrT3Kl+fz0AeR OJSQ== X-Gm-Message-State: AKwxytfq85weFosjf2ny5X8LecqAUYTCwCX3s7KsbzgeoVbS2utpN2+X dEd9/HJp7QHN9XMUu8BXbOOvQp1vnok= X-Received: by 10.98.13.14 with SMTP id v14mr28229027pfi.184.1517274016350; Mon, 29 Jan 2018 17:00:16 -0800 (PST) Received: from exogeni.mtv.corp.google.com ([2620:0:1000:1600:211e:5908:95bc:4888]) by smtp.gmail.com with ESMTPSA id c29sm36477492pfd.172.2018.01.29.17.00.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Jan 2018 17:00:15 -0800 (PST) From: Derek Basehore To: linux-kernel@vger.kernel.org Cc: Soby.Mathew@arm.com, sudeep.holla@arm.com, devicetree@vger.kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, linux-pm@vger.kernel.org, rafael.j.wysocki@intel.com, tglx@linutronix.de, briannorris@chromium.org, marc.zyngier@arm.com, Derek Basehore Subject: [PATCH v3 1/5] cpu_pm: add syscore_suspend error handling Date: Mon, 29 Jan 2018 17:00:03 -0800 Message-Id: <20180130010007.256564-2-dbasehore@chromium.org> X-Mailer: git-send-email 2.16.0.rc1.238.g530d649a79-goog In-Reply-To: <20180130010007.256564-1-dbasehore@chromium.org> References: <20180130010007.256564-1-dbasehore@chromium.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If cpu_cluster_pm_enter() fails, cpu_pm_exit() should be called. This will put the CPU in the correct state to resume from the failure. Signed-off-by: Derek Basehore --- kernel/cpu_pm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/cpu_pm.c b/kernel/cpu_pm.c index 67b02e138a47..03bcc0751a51 100644 --- a/kernel/cpu_pm.c +++ b/kernel/cpu_pm.c @@ -186,6 +186,9 @@ static int cpu_pm_suspend(void) return ret; ret = cpu_cluster_pm_enter(); + if (ret) + cpu_pm_exit(); + return ret; } -- 2.16.0.rc1.238.g530d649a79-goog