[tip:x86/platform] x86, mrst: Check platform_device_register() return code

From: tip-bot for Vasiliy Kulikov
Date: Thu Nov 18 2010 - 16:49:58 EST


Commit-ID: 5ca9afdb9f6a5267927b54de3f42c756e8af7fcd
Gitweb: http://git.kernel.org/tip/5ca9afdb9f6a5267927b54de3f42c756e8af7fcd
Author: Vasiliy Kulikov <segoon@xxxxxxxxxxxx>
AuthorDate: Thu, 18 Nov 2010 21:16:45 +0300
Committer: H. Peter Anvin <hpa@xxxxxxxxxxxxxxx>
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@xxxxxxxxxxxx>
LKML-Reference: <1290104207-31279-1-git-send-email-segoon@xxxxxxxxxxxx>
Acked-by: Alan Cox <alan@xxxxxxxxxxxxxxx>
Signed-off-by: H. Peter Anvin <hpa@xxxxxxxxxxxxxxx>
---
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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/