lkml.org 
[lkml]   [2013]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] x86, msr/cpuid: Cocci spatch "ptr_ret.spatch"
From
Date

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)



\
 
 \ /
  Last update: 2013-06-01 12:41    [W:0.035 / U:1.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site