Browse Source

x86, cpuid: Use PTR_ERR_OR_ZERO

Replace IS_ERR/PTR_ERR

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Link: http://lkml.kernel.org/r/1413576077-26969-1-git-send-email-fabf@skynet.be
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Fabian Frederick 10 năm trước cách đây
mục cha
commit
cbda45a2d4
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      arch/x86/kernel/cpuid.c

+ 1 - 1
arch/x86/kernel/cpuid.c

@@ -143,7 +143,7 @@ static int cpuid_device_create(int cpu)
 
 	dev = device_create(cpuid_class, NULL, MKDEV(CPUID_MAJOR, cpu), NULL,
 			    "cpu%d", cpu);
-	return IS_ERR(dev) ? PTR_ERR(dev) : 0;
+	return PTR_ERR_OR_ZERO(dev);
 }
 
 static void cpuid_device_destroy(int cpu)