From: Julia Lawall Date: Sat, 15 May 2010 21:19:15 +0000 (+0200) Subject: Bluetooth: Use kmemdup for drivers X-Git-Tag: v2.6.36-rc1~571^2~64^2~48^2~48 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ee283c063a236b19e4582c675a2d8d615d5809c;p=pandora-kernel.git Bluetooth: Use kmemdup for drivers Use kmemdup when some other buffer is immediately copied into the allocated region. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression from,to,size,flag; statement S; @@ - to = \(kmalloc\|kzalloc\)(size,flag); + to = kmemdup(from,size,flag); if (to==NULL || ...) S - memcpy(to, from, size); // Signed-off-by: Julia Lawall Acked-by: Gustavo F. Padovan Signed-off-by: Marcel Holtmann --- Reading git-diff-tree failed