From patchwork Fri Apr 22 07:22:11 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: MyungJoo Ham X-Patchwork-Id: 726341 Received: from smtp1.linux-foundation.org (smtp1.linux-foundation.org [140.211.169.13]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p3M7OW8x012231 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Fri, 22 Apr 2011 07:24:53 GMT Received: from daredevil.linux-foundation.org (localhost [127.0.0.1]) by smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with ESMTP id p3M7MK6f032088; Fri, 22 Apr 2011 00:22:22 -0700 Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with ESMTP id p3M7MFrU032078 for ; Fri, 22 Apr 2011 00:22:17 -0700 Received: from epcpsbgm2.samsung.com (mailout2.samsung.com [203.254.224.25]) by mailout2.samsung.com (Oracle Communications Messaging Exchange Server 7u4-19.01 64bit (built Sep 7 2010)) with ESMTP id <0LK1006JELT0CBI0@mailout2.samsung.com> for linux-pm@lists.linux-foundation.org; Fri, 22 Apr 2011 16:22:12 +0900 (KST) X-AuditID: cbfee61b-b7c7bae000000eb3-2b-4db12ca4d5fe Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (MMPCPMTA) with SMTP id 7E.55.03763.4AC21BD4; Fri, 22 Apr 2011 16:22:12 +0900 (KST) Received: from TNRNDGASPAPP1.tn.corp.samsungelectronics.net ([165.213.149.150]) by mmp2.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0LK1008FWLT02L@mmp2.samsung.com> for linux-pm@lists.linux-foundation.org; Fri, 22 Apr 2011 16:22:12 +0900 (KST) Received: from Hisui ([165.213.219.116]) by TNRNDGASPAPP1.tn.corp.samsungelectronics.net with Microsoft SMTPSVC(6.0.3790.4675); Fri, 22 Apr 2011 16:22:11 +0900 Date: Fri, 22 Apr 2011 16:22:11 +0900 From: MyungJoo Ham To: linux-pm@lists.linux-foundation.org Message-id: <1303456931-11657-1-git-send-email-myungjoo.ham@samsung.com> X-Mailer: git-send-email 1.7.1 X-OriginalArrivalTime: 22 Apr 2011 07:22:11.0838 (UTC) FILETIME=[FF4431E0:01CC00BD] X-Brightmail-Tracker: AAAAAA== Received-SPF: pass (localhost is always allowed.) X-Spam-Status: No, hits=-13.718 required=5 tests=AWL, BAYES_00, OSDL_HEADER_SUBJECT_BRACKETED, PATCH_SUBJECT_OSDL, SAMSUNG_WEBMAIL_OSDL X-Spam-Checker-Version: SpamAssassin 3.2.4-osdl_revision__1.47__ X-MIMEDefang-Filter: lf$Revision: 1.188 $ X-Scanned-By: MIMEDefang 2.63 on 140.211.169.21 Cc: Len Brown , linux-kernel@vger.kernel.org, kyungmin.park@samsung.com Subject: [linux-pm] [PATCH] pm / core bugfix: report error return from suspend_enter X-BeenThere: linux-pm@lists.linux-foundation.org X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux power management List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-pm-bounces@lists.linux-foundation.org Errors-To: linux-pm-bounces@lists.linux-foundation.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 22 Apr 2011 07:24:53 +0000 (UTC) The current implementation of suspend-to-RAM returns 0 if there is an error from suspend_enter() because suspend_devices_and_enter() ignores the return value from suspend_enter(). This patch addresses this issue and properly keep the error return from suspend_enter() and let suspend_devices_and_enter relay the error return. Signed-off-by: MyungJoo Ham Signed-off-by: Kyungmin Park --- kernel/power/suspend.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c index 2814c32..08515b4 100644 --- a/kernel/power/suspend.c +++ b/kernel/power/suspend.c @@ -224,7 +224,7 @@ int suspend_devices_and_enter(suspend_state_t state) if (suspend_test(TEST_DEVICES)) goto Recover_platform; - suspend_enter(state); + error = suspend_enter(state); Resume_devices: suspend_test_start();