diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-06-13 11:24:38 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-06-13 11:24:38 +0300 |
commit | 289733ed456f7c1cbdb1f1ca58312f77c239953b (patch) | |
tree | 99bed0a5c21d0bdc5f6c10bc80a1ae8dbbd56be6 /drivers/video/xen-fbfront.c | |
parent | c3a21fc79b6bc097d8b0e47498903a649a111127 (diff) | |
parent | cfaf025112d3856637ff34a767ef785ef5cf2ca9 (diff) | |
download | blackbird-op-linux-289733ed456f7c1cbdb1f1ca58312f77c239953b.tar.gz blackbird-op-linux-289733ed456f7c1cbdb1f1ca58312f77c239953b.zip |
Merge tag 'v3.5-rc2'
Merge v3.5-rc2 to get latest device tree and dynamic debug changes.
Diffstat (limited to 'drivers/video/xen-fbfront.c')
-rw-r--r-- | drivers/video/xen-fbfront.c | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/drivers/video/xen-fbfront.c b/drivers/video/xen-fbfront.c index cb4529c40d74..b7f5173ff9e9 100644 --- a/drivers/video/xen-fbfront.c +++ b/drivers/video/xen-fbfront.c @@ -365,7 +365,7 @@ static int __devinit xenfb_probe(struct xenbus_device *dev, struct fb_info *fb_info; int fb_size; int val; - int ret; + int ret = 0; info = kzalloc(sizeof(*info), GFP_KERNEL); if (info == NULL) { @@ -458,26 +458,31 @@ static int __devinit xenfb_probe(struct xenbus_device *dev, xenfb_init_shared_page(info, fb_info); ret = xenfb_connect_backend(dev, info); - if (ret < 0) - goto error; + if (ret < 0) { + xenbus_dev_fatal(dev, ret, "xenfb_connect_backend"); + goto error_fb; + } ret = register_framebuffer(fb_info); if (ret) { - fb_deferred_io_cleanup(fb_info); - fb_dealloc_cmap(&fb_info->cmap); - framebuffer_release(fb_info); xenbus_dev_fatal(dev, ret, "register_framebuffer"); - goto error; + goto error_fb; } info->fb_info = fb_info; xenfb_make_preferred_console(); return 0; - error_nomem: - ret = -ENOMEM; - xenbus_dev_fatal(dev, ret, "allocating device memory"); - error: +error_fb: + fb_deferred_io_cleanup(fb_info); + fb_dealloc_cmap(&fb_info->cmap); + framebuffer_release(fb_info); +error_nomem: + if (!ret) { + ret = -ENOMEM; + xenbus_dev_fatal(dev, ret, "allocating device memory"); + } +error: xenfb_remove(dev); return ret; } |