mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Meyer <thomas@m3y3r.de>
To: hpa@zytor.com, tglx@linutronix.de, mingo@redhat.com,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] x86, msr/cpuid: Cocci spatch "ptr_ret.spatch"
Date: Sat, 01 Jun 2013 11:58:59 +0200	[thread overview]
Message-ID: <1370080739.29224.36.camel@localhost.localdomain> (raw)


Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
---

diff -u -p a/arch/x86/kernel/cpuid.c b/arch/x86/kernel/cpuid.c
--- a/arch/x86/kernel/cpuid.c
+++ b/arch/x86/kernel/cpuid.c
@@ -143,7 +143,7 @@ static __cpuinit int cpuid_device_create
 
 	dev = device_create(cpuid_class, NULL, MKDEV(CPUID_MAJOR, cpu), NULL,
 			    "cpu%d", cpu);
-	return IS_ERR(dev) ? PTR_ERR(dev) : 0;
+	return PTR_RET(dev);
 }
 
 static void cpuid_device_destroy(int cpu)
diff -u -p a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c
--- a/arch/x86/kernel/msr.c
+++ b/arch/x86/kernel/msr.c
@@ -206,7 +206,7 @@ static int __cpuinit msr_device_create(i
 
 	dev = device_create(msr_class, NULL, MKDEV(MSR_MAJOR, cpu), NULL,
 			    "msr%d", cpu);
-	return IS_ERR(dev) ? PTR_ERR(dev) : 0;
+	return PTR_RET(dev);
 }
 
 static void msr_device_destroy(int cpu)



             reply	other threads:[~2013-06-01  9:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-01  9:58 Thomas Meyer [this message]
2013-06-01 14:49 ` H. Peter Anvin

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=1370080739.29224.36.camel@localhost.localdomain \
    --to=thomas@m3y3r.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@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

all inboxes | Powered by JetHome®