]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/video/savage/savagefb-i2c.c
Merge master.kernel.org:/home/rmk/linux-2.6-mmc
[linux-2.6-omap-h63xx.git] / drivers / video / savage / savagefb-i2c.c
index 959404ad68f433803ba06e824f5b427b4e143cb4..3c98457783c42f4caf050c9c14060bef5cb583ac 100644 (file)
@@ -274,10 +274,13 @@ int savagefb_probe_i2c_connector(struct fb_info *info, u8 **out_edid)
 
        if (!edid) {
                /* try to get from firmware */
-               edid = kmalloc(EDID_LENGTH, GFP_KERNEL);
-               if (edid)
-                       memcpy(edid, fb_firmware_edid(info->device),
-                              EDID_LENGTH);
+               const u8 *e = fb_firmware_edid(info->device);
+
+               if (e) {
+                       edid = kmalloc(EDID_LENGTH, GFP_KERNEL);
+                       if (edid)
+                               memcpy(edid, e, EDID_LENGTH);
+               }
        }
 
        if (out_edid)