Received: by 10.223.176.5 with SMTP id f5csp85107wra; Tue, 6 Feb 2018 17:45:17 -0800 (PST) X-Google-Smtp-Source: AH8x224WW9BiWx5KBVlOCBx5leSUUtFvToyYNBUM8wciQ+wmiUE374RjmWt/kWybaFTV6Goq5vci X-Received: by 10.99.3.6 with SMTP id 6mr3507730pgd.334.1517967917335; Tue, 06 Feb 2018 17:45:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517967917; cv=none; d=google.com; s=arc-20160816; b=CaENOM1CNyfT6pFhg3+eZABM91embz6JNnGYlu6S6SwE6MQqRsQumzhykVMIfPP6f7 27xcAUcXnE2pimRUi5KMXRtjMqtgrjaE9r1Ds0RXuA0p+N56uYwy0AW9SYabz0Rc++dh Ywln7skREU9sk1/jnk/joVhRQB37/vmlTDWEGQz48zsACuTo1Zn84ZKh2furqe4Be0eQ /BKKY8IwOFBMkBNWdhb4zgfOpk1y5Zeezn0i94PtRmUGkE/vHLw9ZxL1dsCTU6lO0FT/ 1wlxzUfOYnsNj6Sb7lFEXMs8Wg1wctiihDs76vxtChEfP2oiz5EjG9/wubHHAzKEkp/v mSOA== 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=SZWfeO5Q/F21bmXxDM9FGJRYL0gA5jEfxpvpDahlnYqN0PhE3JrNtl5EjoU7C5ngDE yHrqf2jo5JCY4z7M8r8A+nHoi1LKwGMKtpCqhG+npOgh4lt8V3HDUd7CZ6LSD/5k6eJO xjy2jYjbSYwJ7or6tzEeujLFvi8E0S1uKhk4lKVymI8wqz/5zTvBcjch1CMNJCQtZDkf /XcINaqnbUWfl/Gz4BEyxeHjj/L0tPp68/+XuF1i/LKhMVBjYSNxoyXGc8jxs8yJHsWI yNruop8xhDUrjm1sUOVGCFlGqmwct+J95FgHB/LYsABPitimUu13AVdJHI2jijT8N8wt IPOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Q1RiaqJ1; 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 69-v6si250939plb.573.2018.02.06.17.45.00; Tue, 06 Feb 2018 17:45:17 -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=Q1RiaqJ1; 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 S1753162AbeBGBni (ORCPT + 99 others); Tue, 6 Feb 2018 20:43:38 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:39945 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932197AbeBGBl1 (ORCPT ); Tue, 6 Feb 2018 20:41:27 -0500 Received: by mail-pg0-f67.google.com with SMTP id g2so1874056pgn.7 for ; Tue, 06 Feb 2018 17:41:27 -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=Q1RiaqJ1hOXbKQ51UWYmI1M717RbDgOsHmS6n1xgKt2YYZiZWBe875z6pcEO2YFD2L frckQRd6hIewAKtj+unLJ1XAoYXmzqrcRAN22m4hAfApPjHTYYibEmWQmA3UOIklv1XG qu3GSm3IBZqDl76zuLoFbe1sRMeoL3RuxZ2JA= 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=IxXMX4A8z4s/hkD06KQlVmDIHVsb83i/UxaKjLYi6/wBjK+Zr8xJnWrucTWbBrNroE /IXymfQHSInlYyOccmhh78bKMw+3kmgwSLa6A98HfLWxwzTex6IX/CFUat1cnAMSm+QE lEr8pPsBj/haI5rlNnS5dfYPgzxU9lbWvjZfLWg2A9eTp475pe5o2Or0DPDNEgC06QJh 7JKctq4ilsja9ub4AYNVeTtpLz+d4K2Z5zKhwsxIQtUyu73ZAckZKprX0qHtS3Dse+SI BKfk3w7zliYdyGYng+jmZdoUc1cPKmrIG/slVuiFRYz3u4zUQGnS2oNGbv8V6N9VpzFN 7PPA== X-Gm-Message-State: APf1xPCp2MsUuFmWisQ+oYHwWFq+GmpywAELjntdlQkRWnIcxRvaFhwh jfvsc+5lObp/T55hMY3s99cw5HgKjBk= X-Received: by 10.101.81.197 with SMTP id i5mr3489062pgq.220.1517967686515; Tue, 06 Feb 2018 17:41:26 -0800 (PST) Received: from exogeni.mtv.corp.google.com ([2620:0:1000:1600:211e:5908:95bc:4888]) by smtp.gmail.com with ESMTPSA id k71sm573529pfg.52.2018.02.06.17.41.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Feb 2018 17:41:25 -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 v5 1/4] cpu_pm: add syscore_suspend error handling Date: Tue, 6 Feb 2018 17:41:14 -0800 Message-Id: <20180207014117.62611-2-dbasehore@chromium.org> X-Mailer: git-send-email 2.16.0.rc1.238.g530d649a79-goog In-Reply-To: <20180207014117.62611-1-dbasehore@chromium.org> References: <20180207014117.62611-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