aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/savage/savagefb-i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/savage/savagefb-i2c.c')
-rw-r--r--drivers/video/savage/savagefb-i2c.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/video/savage/savagefb-i2c.c b/drivers/video/savage/savagefb-i2c.c
index 3f94223b7f0c..cef5bf591cdf 100644
--- a/drivers/video/savage/savagefb-i2c.c
+++ b/drivers/video/savage/savagefb-i2c.c
@@ -227,11 +227,8 @@ int savagefb_probe_i2c_connector(struct fb_info *info, u8 **out_edid)
227 /* try to get from firmware */ 227 /* try to get from firmware */
228 const u8 *e = fb_firmware_edid(info->device); 228 const u8 *e = fb_firmware_edid(info->device);
229 229
230 if (e) { 230 if (e)
231 edid = kmalloc(EDID_LENGTH, GFP_KERNEL); 231 edid = kmemdup(e, EDID_LENGTH, GFP_KERNEL);
232 if (edid)
233 memcpy(edid, e, EDID_LENGTH);
234 }
235 } 232 }
236 233
237 *out_edid = edid; 234 *out_edid = edid;