Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965340AbeALVYn (ORCPT + 1 other); Fri, 12 Jan 2018 16:24:43 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:46841 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965175AbeALVYk (ORCPT ); Fri, 12 Jan 2018 16:24:40 -0500 X-Google-Smtp-Source: ACJfBov+dAspjYdcanMjd3zsH++toieysWKjv9m1mISE4tyg9cHlqwzgvLZSESF88yKgoqM/LvePKw== From: Derek Basehore To: linux-kernel@vger.kernel.org Cc: linux-pm@vger.kernel.org, rafael.j.wysocki@intel.com, tglx@linutronix.de, briannorris@chromium.org, marc.zyngier@arm.com, Derek Basehore Subject: [PATCH 1/8] cpu_pm: add syscore_suspend error handling Date: Fri, 12 Jan 2018 13:24:15 -0800 Message-Id: <20180112212422.148625-2-dbasehore@chromium.org> X-Mailer: git-send-email 2.16.0.rc1.238.g530d649a79-goog In-Reply-To: <20180112212422.148625-1-dbasehore@chromium.org> References: <20180112212422.148625-1-dbasehore@chromium.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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. Change-Id: I4e499d686ea6046103be355d3a92bb0d51525f53 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