mirror of
https://github.com/torvalds/linux.git
synced 2026-12-01 11:03:37 +00:00
This patch replaces calls to kmalloc that are followed
by memcpy with calls to kmemdup.
This patch was found using coccicheck with api/memdup.cocci,
with memdup.cocci script slightly altered in the following way:
@depends on patch@
expression from,to,size,flag;
position p != {r1.p,r2.p};
@@
- to = \(kmalloc@p\|kzalloc@p\)(size,flag);
+ to = kmemdup(from,size,flag);
- memcpy(to, from, size);
Signed-off-by: Xenia Ragiadakou <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
TODO: - checkpatch.pl cleanups - sparse warnings - move to use the in-kernel wireless stack Please send any patches or complaints about this driver to Greg Kroah-Hartman <[email protected]> and don't bother the upstream wireless kernel developers about it, they want nothing to do with it.