From: Jiri Slaby <[email-masked]>

Signed-off-by: Lion Vollnhals <[email-masked]>
Signed-off-by: Jiri Slaby <[email-masked]>
Cc: Greg KH <[email-masked]>
Signed-off-by: Andrew Morton <[email-masked]>
---

 drivers/base/class.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -puN drivers/base/class.c~drivers-base-use-kzalloc-instead-of-kmallocmemset-gregkh-bits drivers/base/class.c
--- devel/drivers/base/class.c~drivers-base-use-kzalloc-instead-of-kmallocmemset-gregkh-bits	2005-09-12 18:24:46.000000000 -0700
+++ devel-akpm/drivers/base/class.c	2005-09-12 18:24:46.000000000 -0700
@@ -533,13 +533,13 @@ int class_device_add(struct class_device
 		class_device_create_file(class_dev, attr);
 		class_dev->devt_attr = attr;
 
-		attr = kmalloc(sizeof(*attr), GFP_KERNEL);
+		attr = kzalloc(sizeof(*attr), GFP_KERNEL);
 		if (!attr) {
 			error = -ENOMEM;
 			kobject_del(&class_dev->kobj);
 			goto register_done;
 		}
-		memset(attr, sizeof(*attr), 0x00);
+
 		attr->attr.name = "sample.sh";
 		attr->attr.mode = S_IRUSR | S_IXUSR | S_IRUGO;
 		attr->attr.owner = parent->owner;
_