diff --git a/[refs] b/[refs] index efc0797ef86e..d8270800e23b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: be871b7e54711479d3b9d3617d49898770830db2 +refs/heads/master: 8f46baaa7ec6cd0851794020b31958e64679dd26 diff --git a/trunk/drivers/base/core.c b/trunk/drivers/base/core.c index 56536f4b0f6b..a7391a30cb29 100644 --- a/trunk/drivers/base/core.c +++ b/trunk/drivers/base/core.c @@ -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; }