]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/video/intelfb/intelfbdrv.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
[linux-2.6-omap-h63xx.git] / drivers / video / intelfb / intelfbdrv.c
index 6f9de04193d216d62f62511f7bbb0cd821d3c0df..b75eda84858f62ad62937242903ba36bcf471811 100644 (file)
@@ -540,12 +540,11 @@ intelfb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent)
        dinfo->pdev  = pdev;
 
        /* Reserve pixmap space. */
-       info->pixmap.addr = kmalloc(64 * 1024, GFP_KERNEL);
+       info->pixmap.addr = kzalloc(64 * 1024, GFP_KERNEL);
        if (info->pixmap.addr == NULL) {
                ERR_MSG("Cannot reserve pixmap memory.\n");
                goto err_out_pixmap;
        }
-       memset(info->pixmap.addr, 0, 64 * 1024);
 
        /* set early this option because it could be changed by tv encoder
           driver */
@@ -1058,10 +1057,9 @@ intelfb_init_var(struct intelfb_info *dinfo)
                u8 *edid_d = NULL;
 
                if (edid_s) {
-                       edid_d = kmalloc(EDID_LENGTH, GFP_KERNEL);
+                       edid_d = kmemdup(edid_s, EDID_LENGTH, GFP_KERNEL);
 
                        if (edid_d) {
-                               memcpy(edid_d, edid_s, EDID_LENGTH);
                                fb_edid_to_monspecs(edid_d,
                                                    &dinfo->info->monspecs);
                                kfree(edid_d);