Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 264731
b: refs/heads/master
c: 8f25229
h: refs/heads/master
i:
  264729: 3a8ddc6
  264727: d47f23a
v: v3
  • Loading branch information
Dan Carpenter authored and Jiri Kosina committed Aug 23, 2011
1 parent 01fbd83 commit df1908c
Show file tree
Hide file tree
Showing 2 changed files with 3 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: 2bbaf771eb69f7fd333c4708fd76f94a3bdaf207
refs/heads/master: 8f25229026c89912574558d0a4e36c8fe51b9bb4
4 changes: 2 additions & 2 deletions trunk/drivers/hid/hid-lg4ff.c
Original file line number Diff line number Diff line change
Expand Up @@ -435,12 +435,12 @@ int lg4ff_init(struct hid_device *hid)
hid_err(hid, "Cannot add device, insufficient memory.\n");
return -ENOMEM;
}
entry->device_id = (char *)kzalloc(strlen((&hid->dev)->kobj.name) + 1, GFP_KERNEL);
entry->device_id = kstrdup((&hid->dev)->kobj.name, GFP_KERNEL);
if (!entry->device_id) {
hid_err(hid, "Cannot set device_id, insufficient memory.\n");
kfree(entry);
return -ENOMEM;
}
strcpy(entry->device_id, (&hid->dev)->kobj.name);
entry->min_range = lg4ff_devices[i].min_range;
entry->max_range = lg4ff_devices[i].max_range;
entry->set_range = lg4ff_devices[i].set_range;
Expand Down

0 comments on commit df1908c

Please sign in to comment.