lkml.org 
[lkml]   [2010]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[tip:x86/platform] x86, mrst: Check platform_device_register() return code
Commit-ID:  5ca9afdb9f6a5267927b54de3f42c756e8af7fcd
Gitweb: http://git.kernel.org/tip/5ca9afdb9f6a5267927b54de3f42c756e8af7fcd
Author: Vasiliy Kulikov <segoon@openwall.com>
AuthorDate: Thu, 18 Nov 2010 21:16:45 +0300
Committer: H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Thu, 18 Nov 2010 13:45:46 -0800

x86, mrst: Check platform_device_register() return code

platform_device_register() may fail, if so propagate the return
code from mrst_device_create().

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
LKML-Reference: <1290104207-31279-1-git-send-email-segoon@openwall.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
---
arch/x86/platform/mrst/vrtc.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/arch/x86/platform/mrst/vrtc.c b/arch/x86/platform/mrst/vrtc.c
index 4d3f770..32cd7ed 100644
--- a/arch/x86/platform/mrst/vrtc.c
+++ b/arch/x86/platform/mrst/vrtc.c
@@ -159,8 +159,7 @@ static int __init mrst_device_create(void)
vrtc_resources[1].start = sfi_mrtc_array[0].irq;
vrtc_resources[1].end = sfi_mrtc_array[0].irq;

- platform_device_register(&vrtc_device);
- return 0;
+ return platform_device_register(&vrtc_device);
}

module_init(mrst_device_create);

\
 
 \ /
  Last update: 2010-11-18 22:53    [from the cache]
©2003-2011 Jasper Spaans