Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 162587
b: refs/heads/master
c: daa4122
h: refs/heads/master
i:
  162585: 454ebab
  162583: 60049bb
v: v3
  • Loading branch information
Andrew Morton authored and Greg Kroah-Hartman committed Sep 15, 2009
1 parent 2ba63c7 commit 8d74729
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 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: 4622709445705c1e423d2addcfd8ccae052fe0ba
refs/heads/master: daa4122673f002911122cac2b996bd36b6c01b32
8 changes: 4 additions & 4 deletions trunk/drivers/base/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* information.
*/

#include <linux/string.h>
#include <linux/platform_device.h>
#include <linux/module.h>
#include <linux/init.h>
Expand Down Expand Up @@ -213,14 +214,13 @@ EXPORT_SYMBOL_GPL(platform_device_add_resources);
int platform_device_add_data(struct platform_device *pdev, const void *data,
size_t size)
{
void *d;
void *d = kmemdup(data, size, GFP_KERNEL);

d = kmalloc(size, GFP_KERNEL);
if (d) {
memcpy(d, data, size);
pdev->dev.platform_data = d;
return 0;
}
return d ? 0 : -ENOMEM;
return -ENOMEM;
}
EXPORT_SYMBOL_GPL(platform_device_add_data);

Expand Down

0 comments on commit 8d74729

Please sign in to comment.