linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Neal Liu <neal.liu@mediatek.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Len Brown <lenb@kernel.org>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Jacob Pan <jacob.jun.pan@linux.intel.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Sami Tolvanen <samitolvanen@google.com>
Cc: Neal Liu <neal.liu@mediatek.com>, <linux-acpi@vger.kernel.org>,
	<linux-pm@vger.kernel.org>, <linux-tegra@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>,
	lkml <linux-kernel@vger.kernel.org>, <wsd_upstream@mediatek.com>
Subject: [PATCH] acpi: fix 'return' with no value build warning
Date: Fri, 31 Jul 2020 11:39:04 +0800	[thread overview]
Message-ID: <1596166744-2954-2-git-send-email-neal.liu@mediatek.com> (raw)
In-Reply-To: <1596166744-2954-1-git-send-email-neal.liu@mediatek.com>

Fixing CFI issue which introduced by commit efe9711214e6 is
incomplete.
Add return value to fix return-type build warning.

Signed-off-by: Neal Liu <neal.liu@mediatek.com>
---
 drivers/acpi/processor_idle.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 6ffb6c9..6870020 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -664,11 +664,11 @@ static int acpi_idle_enter_s2idle(struct cpuidle_device *dev,
 		struct acpi_processor *pr = __this_cpu_read(processors);
 
 		if (unlikely(!pr))
-			return;
+			return -EFAULT;
 
 		if (pr->flags.bm_check) {
 			acpi_idle_enter_bm(pr, cx, false);
-			return;
+			return 0;
 		} else {
 			ACPI_FLUSH_CPU_CACHE();
 		}
-- 
1.7.9.5

  reply	other threads:[~2020-07-31  3:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-31  3:39 acpi: fix 'return' with no value build warning Neal Liu
2020-07-31  3:39 ` Neal Liu [this message]
2020-07-31 11:33   ` [PATCH] " Rafael J. Wysocki
2020-08-03  2:40     ` Neal Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1596166744-2954-2-git-send-email-neal.liu@mediatek.com \
    --to=neal.liu@mediatek.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=jacob.jun.pan@linux.intel.com \
    --cc=jonathanh@nvidia.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=rjw@rjwysocki.net \
    --cc=samitolvanen@google.com \
    --cc=thierry.reding@gmail.com \
    --cc=wsd_upstream@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).