diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-09-16 02:46:15 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-09-16 02:46:15 -0400 |
commit | c5f977a0d2d6a8f02f32139b5dd129e52073f38f (patch) | |
tree | 82180b8f21992312ad78becf759f21b9110e72ca /drivers/video/savage/savagefb-i2c.c | |
parent | f3d242e8f2bf12cb45eb35b7d2e69483d1209b13 (diff) | |
parent | 065d9cac98a5406ecd5a1368f8fd38f55739dee9 (diff) |
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'drivers/video/savage/savagefb-i2c.c')
-rw-r--r-- | drivers/video/savage/savagefb-i2c.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/video/savage/savagefb-i2c.c b/drivers/video/savage/savagefb-i2c.c index 959404ad68f..3c98457783c 100644 --- a/drivers/video/savage/savagefb-i2c.c +++ b/drivers/video/savage/savagefb-i2c.c @@ -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) |