aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/vesafb.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2010-05-03 09:17:01 +0200
committerIngo Molnar <mingo@elte.hu>2010-05-03 09:17:01 +0200
commit53ba4f2fa73225113a488584df0d85d3cba52943 (patch)
treed85b984d9818abc3ccc0237eb53b710d9e96c39e /drivers/video/vesafb.c
parentlockstat: Make lockstat counting per cpu (diff)
parentLinux 2.6.34-rc6 (diff)
downloadlinux-dev-53ba4f2fa73225113a488584df0d85d3cba52943.tar.xz
linux-dev-53ba4f2fa73225113a488584df0d85d3cba52943.zip
Merge commit 'v2.6.34-rc6' into core/locking
Diffstat (limited to 'drivers/video/vesafb.c')
-rw-r--r--drivers/video/vesafb.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/drivers/video/vesafb.c b/drivers/video/vesafb.c
index bd37ee1f6a25..0cadf7aee27e 100644
--- a/drivers/video/vesafb.c
+++ b/drivers/video/vesafb.c
@@ -13,7 +13,6 @@
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/mm.h>
-#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/fb.h>
#include <linux/ioport.h>
@@ -477,7 +476,6 @@ err:
}
static struct platform_driver vesafb_driver = {
- .probe = vesafb_probe,
.driver = {
.name = "vesafb",
},
@@ -493,20 +491,21 @@ static int __init vesafb_init(void)
/* ignore error return of fb_get_options */
fb_get_options("vesafb", &option);
vesafb_setup(option);
- ret = platform_driver_register(&vesafb_driver);
- if (!ret) {
- vesafb_device = platform_device_alloc("vesafb", 0);
+ vesafb_device = platform_device_alloc("vesafb", 0);
+ if (!vesafb_device)
+ return -ENOMEM;
- if (vesafb_device)
- ret = platform_device_add(vesafb_device);
- else
- ret = -ENOMEM;
+ ret = platform_device_add(vesafb_device);
+ if (!ret) {
+ ret = platform_driver_probe(&vesafb_driver, vesafb_probe);
+ if (ret)
+ platform_device_del(vesafb_device);
+ }
- if (ret) {
- platform_device_put(vesafb_device);
- platform_driver_unregister(&vesafb_driver);
- }
+ if (ret) {
+ platform_device_put(vesafb_device);
+ vesafb_device = NULL;
}
return ret;