]> git.baikalelectronics.ru Git - kernel.git/commit
checkpatch: fix krealloc reuse test
authorJoe Perches <joe@perches.com>
Wed, 22 Aug 2018 04:57:50 +0000 (21:57 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 22 Aug 2018 17:52:48 +0000 (10:52 -0700)
commit58a366299029451dfb9687d8f406ca94202dd12f
treea6b088095c1b9388cd2142b9a62691f4d533737b
parentd4fa2b43f76638a4c6872b45ed14f9627419caee
checkpatch: fix krealloc reuse test

The current krealloc test does not function correctly when the temporary
pointer return name contains the original pointer name.

Fix that by maximally matching the return pointer name and the original
pointer name and doing a separate comparison of the both names.

Link: http://lkml.kernel.org/r/e617ecb8c019a9c4c56540a1bec16c8aed43a4e4.camel@perches.com
Signed-off-by: Joe Perches <joe@perches.com>
Reported-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Manish Narani <manish.narani@xilinx.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/checkpatch.pl