diff options
Diffstat (limited to 'drivers/video/fbdev/intelfb/intelfbdrv.c')
-rw-r--r-- | drivers/video/fbdev/intelfb/intelfbdrv.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/video/fbdev/intelfb/intelfbdrv.c b/drivers/video/fbdev/intelfb/intelfbdrv.c index d7463a2a5d83..a76c61512c60 100644 --- a/drivers/video/fbdev/intelfb/intelfbdrv.c +++ b/drivers/video/fbdev/intelfb/intelfbdrv.c @@ -491,10 +491,9 @@ static int intelfb_pci_register(struct pci_dev *pdev, } info = framebuffer_alloc(sizeof(struct intelfb_info), &pdev->dev); - if (!info) { - ERR_MSG("Could not allocate memory for intelfb_info.\n"); - return -ENODEV; - } + if (!info) + return -ENOMEM; + if (fb_alloc_cmap(&info->cmap, 256, 1) < 0) { ERR_MSG("Could not allocate cmap for intelfb_info.\n"); goto err_out_cmap; |