Received: by 10.223.176.5 with SMTP id f5csp184697wra; Fri, 2 Feb 2018 20:04:11 -0800 (PST) X-Google-Smtp-Source: AH8x2265c6t04gyUWcKQcNfKGZTjV4fhUvTeYJPVD4uFkGyPc95ONh0wqDskgQp3gTFYmtLMr7Ux X-Received: by 10.98.31.70 with SMTP id f67mr8104384pff.196.1517630651493; Fri, 02 Feb 2018 20:04:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517630651; cv=none; d=google.com; s=arc-20160816; b=WwauXy6LxBEGy84O7/Um8llfyB+yF+PpT/i1cSTllNtKUyjZbYynVe2NT+bOoKBuJS 9bWYiA/QvMjgcYKC7bIFIpxaMohONbGi963Xd97s5/aIK6Z+8YuJt+ypAvzvVjALVngP 9BuO8tm03d1XsZWM6bL2me3CH47+GC6/Y5yqnAdWoHK+fU/wRPa/nlBnI6R1E8s9KZe2 p0wT9yWgalBML8ST1HcFj9tJvfTXfcPlJgNzf53nad0un0d/N/DXmm6+PuChDqIPg9JI cpeZxfWAb86CV3UU0nNOwoXsP7dEHYHVYiRFvpMNOPc8wi9fS12awcIVwVrqWko1/asF mtFQ== 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=lqdFQ1IZ7CIRZoC8cEz53kDPN+twhtIq291DBKNB2Jk3wM2htpkWi6CM64IgwUJrut XFVD1O2QE+06+r7GD5WHwm/xqUAiUcddDO/aSDyJcidgTNmmwpUgGGUyd6bcwqR/YKBy W+LwBtm0jKGxP+I3JU6h2G0RdI1GKcvwxn2WLjYgjdmD9aNkGDYBYsXkFubDPNQUKE2y ctdHi4wRYSU2LSJb9Xp1vw6o13efeBTrk4gFeLi0k4tZtXs0VX7DGE7DIjzhw42ALAVu DawP+bfHxQdvzBVmF8zqYULQMLZcC6Zc1L3Ji97WGyuZKCvYNb+IZHqm9B2MRyjRfYtj HSsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=etkrBbnd; 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 u64si544935pfk.340.2018.02.02.20.03.54; Fri, 02 Feb 2018 20:04:11 -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=etkrBbnd; 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 S1752690AbeBCBZU (ORCPT + 99 others); Fri, 2 Feb 2018 20:25:20 -0500 Received: from mail-pl0-f66.google.com ([209.85.160.66]:36736 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752140AbeBCBY5 (ORCPT ); Fri, 2 Feb 2018 20:24:57 -0500 Received: by mail-pl0-f66.google.com with SMTP id v3so7468373plg.3 for ; Fri, 02 Feb 2018 17:24:57 -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=etkrBbndA6WD+ocEH3LqSzV89CkhOf4GT0HtIH+oJ9K41M9S0o1A4biDE8PqiJN4cG VyLT9Sso59Scmucc93/4TUvXX1xAVn5fhU8wpqom8y2odzF7rcX06LYI0xJQIIdGrUIF rZ5eZ0aWRgdpB3DClm+yTmd9/DgMD6CVGUAo0= 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=t3whpQ70w4MSy8WyFZpzHL97PxmgDQmGoE8lwsaGDGCjPJP+RmY2COY8DdlDpGZuXC Xf0E5uSqhhRAKu1dxNvdr1+mZCyDANGQc+r1GD+1xug36uOjqChN0Ff02qxbOHeMZuDV fCude7V5inb1qqp8mtQUsFYJPiLcS8zD6iuSgQmLTsuPgOQaC/5PIYwilVwVHCmTlkJi 44lHqRUiFOjWnksxNVTqMRs4Z7QJhZHfSjjcX++vwdYgwXm5Ir1IhLSINTtrNwYCgXCV uTWloJWlJF+YwBmYQqKhLJTcL0CkGinVV33gMA9ZhS0lPuBTstBDkN/UafBpFmMeVfoX fy/w== X-Gm-Message-State: AKwxytfy+MZuB4ogOQHoltFUGa8wvnvqHG3cKAJXFqh7ItHhKSc60BQP zvrG4PTyhWAbUHhtZI7mbeOyQZqRMcE= X-Received: by 2002:a17:902:9a41:: with SMTP id x1-v6mr29579866plv.256.1517621096765; Fri, 02 Feb 2018 17:24:56 -0800 (PST) Received: from exogeni.mtv.corp.google.com ([2620:0:1000:1600:211e:5908:95bc:4888]) by smtp.gmail.com with ESMTPSA id x124sm5332917pfx.105.2018.02.02.17.24.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Feb 2018 17:24:55 -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 v4 1/5] cpu_pm: add syscore_suspend error handling Date: Fri, 2 Feb 2018 17:24:46 -0800 Message-Id: <20180203012450.18378-2-dbasehore@chromium.org> X-Mailer: git-send-email 2.16.0.rc1.238.g530d649a79-goog In-Reply-To: <20180203012450.18378-1-dbasehore@chromium.org> References: <20180203012450.18378-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