From patchwork Tue Jan 30 01:00:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Derek Basehore X-Patchwork-Id: 10191207 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5FB1160375 for ; Tue, 30 Jan 2018 01:01:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 50AE62236A for ; Tue, 30 Jan 2018 01:01:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 423DE28448; Tue, 30 Jan 2018 01:01:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CABD22236A for ; Tue, 30 Jan 2018 01:01:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752162AbeA3BBl (ORCPT ); Mon, 29 Jan 2018 20:01:41 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:34716 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752300AbeA3BAS (ORCPT ); Mon, 29 Jan 2018 20:00:18 -0500 Received: by mail-pf0-f196.google.com with SMTP id e76so7086281pfk.1 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=TzjbZJH5+14y95suQ1ovwivyJbzKRXy7RqHUJeCi+D8Cjdl5hbBU5fKHnwhPCmMuH+ dI9f/7S38+NcvJadm44oXylUdUIOowEQQw3Q6QEiNkBhMb68hlhNPTjEmFb+xigbflaF l8No9hNTZlX5WA+Nhf4vzp2+j2hPbJmaSLzUfcgVwqtiLRkKH8d+LcQ8etli8x8Cnzfd MTqgwcLknIw6OZue7HKK2MYoK0TY20OBJy4oeiQbCr5LH1mJeZ7TwPtZVNBvwPfrlaQL 9DiIeybYLPNiNX3OFug9akkchAbtIK4xeDRRqR0RuO5t+p27Vv0n4Auad3tYhMtTcxxA ZGew== X-Gm-Message-State: AKwxytcOwO4c+oF8tYf0SLperIfUnc8xkyto3VaFYsdqkXHjADmQbhNn pXTM8gXeSGhBqBiNpDwV90xczw== X-Google-Smtp-Source: AH8x225yAwEOvHFJ08y1txr3fwVqFv56flGXsYOWs3dC0GyfWTzwZraEh2xmzxBzoxkrZnzEr8g+aw== 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-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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; }