From: Joe Perches Date: Mon, 29 Apr 2013 23:18:12 +0000 (-0700) Subject: checkpatch: add check for reuse of krealloc arg X-Git-Tag: omap-for-v3.10/dt-fixes-for-merge-window~123^2~223 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=972fdea2e6ece7578915d386a5447bc78d3fb8b8;p=pandora-kernel.git checkpatch: add check for reuse of krealloc arg On Thu, 2013-03-14 at 13:30 +0000, David Woodhouse wrote: > If krealloc() returns NULL, it *doesn't* free the original. So any code > of the form 'foo = krealloc(foo, …);' is almost certainly a bug. So add a check for it to checkpatch. Signed-off-by: Joe Perches Tested-by: Guenter Roeck Acked-by: Guenter Roeck Cc: David Woodhouse Cc: Andy Whitcroft Cc: Jean Delvare Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed