Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 260212
b: refs/heads/master
c: 28a4a16
h: refs/heads/master
v: v3
  • Loading branch information
Rob Clark authored and Dave Airlie committed Jul 15, 2011
1 parent 82f8344 commit ad10e25
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 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: d0254d56c72532b5d818d83c5e247fc627803f08
refs/heads/master: 28a4a163b561c39ac0c798d420e0927f29e9d4c8
5 changes: 3 additions & 2 deletions trunk/drivers/gpu/drm/drm_platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,15 @@ static int drm_platform_set_busid(struct drm_device *dev, struct drm_master *mas
{
int len, ret;

master->unique_len = 10 + strlen(dev->platformdev->name);
master->unique_len = 13 + strlen(dev->platformdev->name);
master->unique_size = master->unique_len;
master->unique = kmalloc(master->unique_len + 1, GFP_KERNEL);

if (master->unique == NULL)
return -ENOMEM;

len = snprintf(master->unique, master->unique_len,
"platform:%s", dev->platformdev->name);
"platform:%s:%02d", dev->platformdev->name, dev->platformdev->id);

if (len > master->unique_len) {
DRM_ERROR("Unique buffer overflowed\n");
Expand Down

0 comments on commit ad10e25

Please sign in to comment.