From 7b6a186d65589901a73d460070504a5e02703c45 Mon Sep 17 00:00:00 2001 From: "Antonino A. Daplas" Date: Thu, 15 Sep 2005 20:58:57 +0800 Subject: [PATCH] savagefb: Fix load failure of the Twister chipset - The Twister chipsets are actually prosavages. Reclassify them as such and remove the S3_SAVAGE_TWISTER id. - Fix i2c code if fb_firmware_edid() returns NULL Signed-off-by: Antonino Daplas Signed-off-by: Linus Torvalds --- drivers/video/savage/savagefb-i2c.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'drivers/video/savage/savagefb-i2c.c') 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) -- cgit v1.2.3