Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 363237
b: refs/heads/master
c: 8f46baa
h: refs/heads/master
i:
  363235: a97f3bb
v: v3
  • Loading branch information
Felipe Balbi authored and Greg Kroah-Hartman committed Mar 15, 2013
1 parent d533633 commit 45b12b5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 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: be871b7e54711479d3b9d3617d49898770830db2
refs/heads/master: 8f46baaa7ec6cd0851794020b31958e64679dd26
9 changes: 8 additions & 1 deletion trunk/drivers/base/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -563,8 +563,15 @@ int device_create_file(struct device *dev,
const struct device_attribute *attr)
{
int error = 0;
if (dev)

if (dev) {
WARN(((attr->attr.mode & S_IWUGO) && !attr->store),
"Write permission without 'store'\n");
WARN(((attr->attr.mode & S_IRUGO) && !attr->show),
"Read permission without 'show'\n");
error = sysfs_create_file(&dev->kobj, &attr->attr);
}

return error;
}

Expand Down

0 comments on commit 45b12b5

Please sign in to comment.