]> err.no Git - linux-2.6/commitdiff
[PATCH] USB: mdc800.c to kzalloc
authorOliver Neukum <oliver@neukum.org>
Fri, 6 Jan 2006 19:45:11 +0000 (20:45 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 20 Mar 2006 22:49:52 +0000 (14:49 -0800)
one more conversion to kzalloc.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/image/mdc800.c

index 049871145d63735bd1fff17ee55dcc23a4ffd826..4e3e4d048c1444eef719ae8608141966879b9293 100644 (file)
@@ -978,13 +978,11 @@ static int __init usb_mdc800_init (void)
 {
        int retval = -ENODEV;
        /* Allocate Memory */
-       mdc800=kmalloc (sizeof (struct mdc800_data), GFP_KERNEL);
+       mdc800=kzalloc (sizeof (struct mdc800_data), GFP_KERNEL);
        if (!mdc800)
                goto cleanup_on_fail;
 
-       memset(mdc800, 0, sizeof(struct mdc800_data));
        mdc800->dev = NULL;
-       mdc800->open=0;
        mdc800->state=NOT_CONNECTED;
        init_MUTEX (&mdc800->io_lock);