Commit 31dbb803 authored by Johannes Weiner's avatar Johannes Weiner Committed by Greg Kroah-Hartman

USB: use kzfree()

Use kzfree() instead of memset() + kfree().
Signed-off-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
Reviewed-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent d34d9721
...@@ -464,8 +464,7 @@ static int __hwahc_dev_set_key(struct wusbhc *wusbhc, u8 port_idx, u32 tkid, ...@@ -464,8 +464,7 @@ static int __hwahc_dev_set_key(struct wusbhc *wusbhc, u8 port_idx, u32 tkid,
port_idx << 8 | iface_no, port_idx << 8 | iface_no,
keyd, keyd_len, 1000 /* FIXME: arbitrary */); keyd, keyd_len, 1000 /* FIXME: arbitrary */);
memset(keyd, 0, sizeof(*keyd)); /* clear keys etc. */ kzfree(keyd); /* clear keys etc. */
kfree(keyd);
return result; return result;
} }
......
...@@ -638,8 +638,7 @@ static void cbaf_disconnect(struct usb_interface *iface) ...@@ -638,8 +638,7 @@ static void cbaf_disconnect(struct usb_interface *iface)
usb_put_intf(iface); usb_put_intf(iface);
kfree(cbaf->buffer); kfree(cbaf->buffer);
/* paranoia: clean up crypto keys */ /* paranoia: clean up crypto keys */
memset(cbaf, 0, sizeof(*cbaf)); kzfree(cbaf);
kfree(cbaf);
} }
static struct usb_device_id cbaf_id_table[] = { static struct usb_device_id cbaf_id_table[] = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment