diff options
Diffstat (limited to 'drivers/video/hecubafb.c')
-rw-r--r-- | drivers/video/hecubafb.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/video/hecubafb.c b/drivers/video/hecubafb.c index 1b94643ecbc..614251a9af9 100644 --- a/drivers/video/hecubafb.c +++ b/drivers/video/hecubafb.c @@ -231,10 +231,9 @@ static int __devinit hecubafb_probe(struct platform_device *dev) videomemorysize = (DPY_W*DPY_H)/8; - if (!(videomemory = vmalloc(videomemorysize))) - return retval; - - memset(videomemory, 0, videomemorysize); + videomemory = vzalloc(videomemorysize); + if (!videomemory) + goto err_videomem_alloc; info = framebuffer_alloc(sizeof(struct hecubafb_par), &dev->dev); if (!info) @@ -276,6 +275,7 @@ err_fbreg: framebuffer_release(info); err_fballoc: vfree(videomemory); +err_videomem_alloc: module_put(board->owner); return retval; } |