diff options
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/class.c | 2 | ||||
-rw-r--r-- | drivers/base/devtmpfs.c | 3 | ||||
-rw-r--r-- | drivers/base/memory.c | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/drivers/base/class.c b/drivers/base/class.c index 161746deab4b..6e2c3b064f53 100644 --- a/drivers/base/class.c +++ b/drivers/base/class.c | |||
@@ -59,6 +59,8 @@ static void class_release(struct kobject *kobj) | |||
59 | else | 59 | else |
60 | pr_debug("class '%s' does not have a release() function, " | 60 | pr_debug("class '%s' does not have a release() function, " |
61 | "be careful\n", class->name); | 61 | "be careful\n", class->name); |
62 | |||
63 | kfree(cp); | ||
62 | } | 64 | } |
63 | 65 | ||
64 | static struct sysfs_ops class_sysfs_ops = { | 66 | static struct sysfs_ops class_sysfs_ops = { |
diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c index 090dd4851301..42ae452b36b0 100644 --- a/drivers/base/devtmpfs.c +++ b/drivers/base/devtmpfs.c | |||
@@ -354,6 +354,7 @@ int __init devtmpfs_init(void) | |||
354 | { | 354 | { |
355 | int err; | 355 | int err; |
356 | struct vfsmount *mnt; | 356 | struct vfsmount *mnt; |
357 | char options[] = "mode=0755"; | ||
357 | 358 | ||
358 | err = register_filesystem(&dev_fs_type); | 359 | err = register_filesystem(&dev_fs_type); |
359 | if (err) { | 360 | if (err) { |
@@ -362,7 +363,7 @@ int __init devtmpfs_init(void) | |||
362 | return err; | 363 | return err; |
363 | } | 364 | } |
364 | 365 | ||
365 | mnt = kern_mount_data(&dev_fs_type, "mode=0755"); | 366 | mnt = kern_mount_data(&dev_fs_type, options); |
366 | if (IS_ERR(mnt)) { | 367 | if (IS_ERR(mnt)) { |
367 | err = PTR_ERR(mnt); | 368 | err = PTR_ERR(mnt); |
368 | printk(KERN_ERR "devtmpfs: unable to create devtmpfs %i\n", err); | 369 | printk(KERN_ERR "devtmpfs: unable to create devtmpfs %i\n", err); |
diff --git a/drivers/base/memory.c b/drivers/base/memory.c index d7d77d4a402c..bd025059711f 100644 --- a/drivers/base/memory.c +++ b/drivers/base/memory.c | |||
@@ -311,7 +311,7 @@ static SYSDEV_ATTR(removable, 0444, show_mem_removable, NULL); | |||
311 | static ssize_t | 311 | static ssize_t |
312 | print_block_size(struct class *class, char *buf) | 312 | print_block_size(struct class *class, char *buf) |
313 | { | 313 | { |
314 | return sprintf(buf, "%lx\n", (unsigned long)PAGES_PER_SECTION * PAGE_SIZE); | 314 | return sprintf(buf, "%#lx\n", (unsigned long)PAGES_PER_SECTION * PAGE_SIZE); |
315 | } | 315 | } |
316 | 316 | ||
317 | static CLASS_ATTR(block_size_bytes, 0444, print_block_size, NULL); | 317 | static CLASS_ATTR(block_size_bytes, 0444, print_block_size, NULL); |