X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=drivers%2Fmd%2Fdm-emc.c;h=c7067674dcb77ca8d1a2e4ee51f032a2bfb9aac8;hb=28d721e24c88496ff8e9c4a0959bdc1415c0658e;hp=7006586645943b81d6b21bd7281b88380c62201a;hpb=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2;p=powerpc.git diff --git a/drivers/md/dm-emc.c b/drivers/md/dm-emc.c index 7006586645..c7067674dc 100644 --- a/drivers/md/dm-emc.c +++ b/drivers/md/dm-emc.c @@ -223,8 +223,10 @@ static struct emc_handler *alloc_emc_handler(void) { struct emc_handler *h = kmalloc(sizeof(*h), GFP_KERNEL); - if (h) + if (h) { + memset(h, 0, sizeof(*h)); spin_lock_init(&h->lock); + } return h; } @@ -259,8 +261,6 @@ static int emc_create(struct hw_handler *hwh, unsigned argc, char **argv) if (!h) return -ENOMEM; - memset(h, 0, sizeof(*h)); - hwh->context = h; if ((h->short_trespass = short_trespass))