mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-m68k@vger.kernel.org, Geert Uytterhoeven <geert@linux-m68k.org>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH 1/3] m68k: Return directly after a failed capable() in sys_cacheflush()
Date: Wed, 18 Jan 2017 17:47:33 +0100	[thread overview]
Message-ID: <71513091-bc01-ce70-893f-3f376062d833@users.sourceforge.net> (raw)
In-Reply-To: <558ff501-7440-a97f-4494-f48591644092@users.sourceforge.net>

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 18 Jan 2017 16:30:36 +0100

Return directly after a call of the function "capable" failed
at the beginning.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 arch/m68k/kernel/sys_m68k.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/m68k/kernel/sys_m68k.c b/arch/m68k/kernel/sys_m68k.c
index 9aa01adb407f..62bfeb3716a7 100644
--- a/arch/m68k/kernel/sys_m68k.c
+++ b/arch/m68k/kernel/sys_m68k.c
@@ -384,9 +384,8 @@ sys_cacheflush (unsigned long addr, int scope, int cache, unsigned long len)
 
 	if (scope == FLUSH_SCOPE_ALL) {
 		/* Only the superuser may explicitly flush the whole cache. */
-		ret = -EPERM;
 		if (!capable(CAP_SYS_ADMIN))
-			goto out;
+			return -EPERM;
 	} else {
 		struct vm_area_struct *vma;
 
-- 
2.11.0

  reply	other threads:[~2017-01-18 16:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-18 16:45 [PATCH 0/3] m68k: Fine-tuning for sys_cacheflush() SF Markus Elfring
2017-01-18 16:47 ` SF Markus Elfring [this message]
2017-02-09 11:06   ` [PATCH 1/3] m68k: Return directly after a failed capable() in sys_cacheflush() Geert Uytterhoeven
2017-01-18 16:49 ` [PATCH 2/3] m68k: Delete an unnecessary variable assignment " SF Markus Elfring
2017-02-09 13:23   ` Geert Uytterhoeven
2017-01-18 16:50 ` [PATCH 3/3] m68k: Add some spaces for better code readability " SF Markus Elfring
2017-02-09 11:12   ` Geert Uytterhoeven
2017-02-09 13:05     ` SF Markus Elfring

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=71513091-bc01-ce70-893f-3f376062d833@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=geert@linux-m68k.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@vger.kernel.org \
    /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

Powered by JetHome