Received: by 10.223.185.116 with SMTP id b49csp6945783wrg; Wed, 28 Feb 2018 19:29:48 -0800 (PST) X-Google-Smtp-Source: AG47ELuqFt2Gmgif55WRN6zPRrtUzLVEzrAJjnOCpST3er8CI+h0mFQuhzOIenCD5abuxtWFNFgN X-Received: by 10.98.61.133 with SMTP id x5mr420466pfj.181.1519874988040; Wed, 28 Feb 2018 19:29:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519874988; cv=none; d=google.com; s=arc-20160816; b=o0k/8igPDpB41TE/75h4Qb3rtZAez0WQtkjrUuec5bx5c0vaT8hIKIV3kxTCzazCj0 Mkf6q9vlJEw5CFBKXyK14IboP1WqooWMPJLAUgXMBLmG7R7eLtgTJf5TXncdNOm7qsib mH+k3MyJMDi4qpdq7SmhcDiTL1kIp13CPQQeURNWKUuZx+VTDAfMhiot3Fz7iH+sgM2w HjfIGUWVzyFCQxyaavHbbWNa84w6g8LsV4ICSz/nohKVVeEFrUoWrPxCD/PWZpsEaXDc m3Im3sElPYi7ZzdezNmMAVJvk0fZiiRBDtuEmAaJ2dU+ve6pOyrFZNMyY9zOyu7n5T2F KxCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=GKdxtN0Yjs/LUPHkicrdck41QgQdJPkad5rGSNoFb8o=; b=S9HLZ0esDCh0UkiyptlHjKEVP001f1kyLjSKbh5C5sPFkCosXQjaDUVgfGlvQaZde0 NQVjKCyvHy9mH/XUoPr6UdXZydFAtUIyAQuonYnymZkU3cSFDO36/V7PrJ2QNx5AL5ac IUWsuIVL0IImZFK4wFNE7HE4Oi31ormwm/wce+wi197VWzLeYcD3fsu6ggpT0soq8UFm jKjlHdPWEMla0j0moVxtyCBbsKH4pIi8r40wYO3PlH6VnuRphxc7tDJ9SuMs+tOI4xlX Ez63bk2a62X+8XIgk1kcf0pkth3riQigpc0+mmSbCV1p1+ByhPE/aWyaJM3F8RcYK/px ya6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=IQLArjBW; 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 x20si1887094pgv.227.2018.02.28.19.29.33; Wed, 28 Feb 2018 19:29:48 -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=IQLArjBW; 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 S965722AbeCAD2b (ORCPT + 99 others); Wed, 28 Feb 2018 22:28:31 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:34764 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965657AbeCAD2A (ORCPT ); Wed, 28 Feb 2018 22:28:00 -0500 Received: by mail-pf0-f193.google.com with SMTP id j20so1913132pfi.1 for ; Wed, 28 Feb 2018 19:28:00 -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; bh=GKdxtN0Yjs/LUPHkicrdck41QgQdJPkad5rGSNoFb8o=; b=IQLArjBWoBQbtCLAgzxqESgeg4zZKSxzCoeEp+NWYJ9A+9088BapbfAbopSXQv7ie/ pWicL9/c7CZSfSVdyDr6mmz/JPrwtjBvOQt+ynsmza57WmCFdKQlnvBnnX5ImSEcSOML I6pmkDKcyhmuZMjfz0v1fxyYS5csW+SPjnBYk= 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; bh=GKdxtN0Yjs/LUPHkicrdck41QgQdJPkad5rGSNoFb8o=; b=MNPOoiE14t75JRTT6tAVb6IXXcJ7CpkjYaHZOUBJgHzJmGB7Sg2JVKrBWuDPNm39Ui FmZ3jfE+AOR59Kwq13dkh2qNweYsmRZGvoQ3uvXUqw7kUmc1wZWq2xbYgp/3GkV6BM8p 0w3g9ZaufM4jiKzgtua3BusWrMa3OAdeVf9Z2Eut0yRMgybzepDCfoCBZTl92iLQ6feK VgQ4/1Ep91g2eTBwipsJYn3Ubl1oh7eZpm8Id6hE636EmMWHNPylDga9Lic6VJrV5/yp i0gfT8c5PBfyL8pkmdk7s/MbL4yWlulWxcorxLGWtv1SN/Nu+kAmvaSmvlWkDw6zpYar hmRQ== X-Gm-Message-State: APf1xPDFTwGgCcmDiZIZwHjaOs9tzs8wAWYcSGv2WvfNKj9mJx52jCmw nlumGMvRJWBsZVDJfVzGnwbhXiuUtKM= X-Received: by 10.99.117.83 with SMTP id f19mr351800pgn.318.1519874879590; Wed, 28 Feb 2018 19:27:59 -0800 (PST) Received: from exogeni.mtv.corp.google.com ([2620:0:1000:1501:f407:8d12:c205:7153]) by smtp.gmail.com with ESMTPSA id v14sm6651209pfi.8.2018.02.28.19.27.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Feb 2018 19:27:58 -0800 (PST) From: Derek Basehore To: linux-kernel@vger.kernel.org Cc: bigeasy@linutronix.de, rafael.j.wysocki@intel.com, alex.shi@linaro.org, briannorris@chromium.org, marc.zyngier@arm.com, Derek Basehore Subject: [PATCH] cpu_pm: add syscore_suspend error handling Date: Wed, 28 Feb 2018 19:27:54 -0800 Message-Id: <20180301032754.146788-1-dbasehore@chromium.org> X-Mailer: git-send-email 2.16.2.395.g2e18187dfd-goog 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.2.395.g2e18187dfd-goog