summaryrefslogtreecommitdiff
path: root/drivers/video/nvidia/nv_i2c.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-09-22 06:34:08 +0400
committerJeff Garzik <jgarzik@pobox.com>2005-09-22 06:34:08 +0400
commita3536c839f04682ed06c84a7f75968c27c6108c8 (patch)
tree92c26ea74c0ffb9b83a2285ad2539cc271b09856 /drivers/video/nvidia/nv_i2c.c
parenta33a1982012e9070736e3717231714dc9892303b (diff)
parentefb0372bbaf5b829ff8c39db372779928af542a7 (diff)
downloadlinux-a3536c839f04682ed06c84a7f75968c27c6108c8.tar.xz
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'drivers/video/nvidia/nv_i2c.c')
-rw-r--r--drivers/video/nvidia/nv_i2c.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/video/nvidia/nv_i2c.c b/drivers/video/nvidia/nv_i2c.c
index ace484fa61ce..12f2884d3f0b 100644
--- a/drivers/video/nvidia/nv_i2c.c
+++ b/drivers/video/nvidia/nv_i2c.c
@@ -209,10 +209,13 @@ int nvidia_probe_i2c_connector(struct fb_info *info, int conn, u8 **out_edid)
if (!edid && conn == 1) {
/* 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 != NULL) {
+ edid = kmalloc(EDID_LENGTH, GFP_KERNEL);
+ if (edid)
+ memcpy(edid, e, EDID_LENGTH);
+ }
}
if (out_edid)