Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 196491
b: refs/heads/master
c: f405a1a
h: refs/heads/master
i:
  196489: 0c622fb
  196487: bd45377
v: v3
  • Loading branch information
Julia Lawall authored and Dave Airlie committed May 18, 2010
1 parent 5aec084 commit b591bfd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ca117d6df95a8f809d37d74c2d715ec3c8c3a4ed
refs/heads/master: f405a1ab2bf316b1969fc5355891e5dff4e1a54c
6 changes: 2 additions & 4 deletions trunk/drivers/gpu/drm/nouveau/nouveau_grctx.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,12 @@ nouveau_grctx_prog_load(struct drm_device *dev)
return ret;
}

pgraph->ctxprog = kmalloc(fw->size, GFP_KERNEL);
pgraph->ctxprog = kmemdup(fw->data, fw->size, GFP_KERNEL);
if (!pgraph->ctxprog) {
NV_ERROR(dev, "OOM copying ctxprog\n");
release_firmware(fw);
return -ENOMEM;
}
memcpy(pgraph->ctxprog, fw->data, fw->size);

cp = pgraph->ctxprog;
if (le32_to_cpu(cp->signature) != 0x5043564e ||
Expand All @@ -97,14 +96,13 @@ nouveau_grctx_prog_load(struct drm_device *dev)
return ret;
}

pgraph->ctxvals = kmalloc(fw->size, GFP_KERNEL);
pgraph->ctxvals = kmemdup(fw->data, fw->size, GFP_KERNEL);
if (!pgraph->ctxvals) {
NV_ERROR(dev, "OOM copying ctxvals\n");
release_firmware(fw);
nouveau_grctx_fini(dev);
return -ENOMEM;
}
memcpy(pgraph->ctxvals, fw->data, fw->size);

cv = (void *)pgraph->ctxvals;
if (le32_to_cpu(cv->signature) != 0x5643564e ||
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/gpu/drm/radeon/radeon_bios.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,11 @@ static bool radeon_read_bios(struct radeon_device *rdev)
pci_unmap_rom(rdev->pdev, bios);
return false;
}
rdev->bios = kmalloc(size, GFP_KERNEL);
rdev->bios = kmemdup(bios, size, GFP_KERNEL);
if (rdev->bios == NULL) {
pci_unmap_rom(rdev->pdev, bios);
return false;
}
memcpy(rdev->bios, bios, size);
pci_unmap_rom(rdev->pdev, bios);
return true;
}
Expand Down

0 comments on commit b591bfd

Please sign in to comment.