]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
USB: use kzfree()
authorJohannes Weiner <hannes@cmpxchg.org>
Wed, 4 Mar 2009 20:06:15 +0000 (12:06 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 24 Mar 2009 23:20:44 +0000 (16:20 -0700)
Use kzfree() instead of memset() + kfree().

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/hwa-hc.c
drivers/usb/wusbcore/cbaf.c

index 8582236e4cad412d0c8fb507c5e278363da461ee..cbf30e515f29f2e7f7668f1143c8f09d02a45738 100644 (file)
@@ -464,8 +464,7 @@ static int __hwahc_dev_set_key(struct wusbhc *wusbhc, u8 port_idx, u32 tkid,
                        port_idx << 8 | iface_no,
                        keyd, keyd_len, 1000 /* FIXME: arbitrary */);
 
-       memset(keyd, 0, sizeof(*keyd)); /* clear keys etc. */
-       kfree(keyd);
+       kzfree(keyd); /* clear keys etc. */
        return result;
 }
 
index 1335cbe1191db8c7e9f84df77ef72bdf46c3065c..25eae405f62252bd9cffef3c4dba28ab100ad1de 100644 (file)
@@ -638,8 +638,7 @@ static void cbaf_disconnect(struct usb_interface *iface)
        usb_put_intf(iface);
        kfree(cbaf->buffer);
        /* paranoia: clean up crypto keys */
-       memset(cbaf, 0, sizeof(*cbaf));
-       kfree(cbaf);
+       kzfree(cbaf);
 }
 
 static struct usb_device_id cbaf_id_table[] = {