summaryrefslogtreecommitdiffstats
path: root/lib/locking-selftest-wsem.h
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2010-10-26 23:23:07 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-27 01:52:19 +0200
commitf3dc0e384248ea6fda0987f909007fa9ab5fb51a (patch)
tree1c834baf780e16a9e47d1cacd41498dbb361483a /lib/locking-selftest-wsem.h
parentlib/list_sort: test: use generic random32 (diff)
downloadlinux-f3dc0e384248ea6fda0987f909007fa9ab5fb51a.tar.xz
linux-f3dc0e384248ea6fda0987f909007fa9ab5fb51a.zip
lib/list_sort: test: improve errors handling
The 'lib_sort()' test does not free memory if it fails, and it makes the kernel panic if it cannot allocate memory. This patch fixes the problem. This patch also changes several small things: o use 'list_add()' helper instead of adding manually o introduce temporary 'el1' variable to avoid ugly and unreadalbe "if" statement o make 'head' to be stack variable instead of 'kmalloc()'ed, which simplifies code a bit Overall, this patch is of clean-up type. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Cc: Don Mullis <don.mullis@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib/locking-selftest-wsem.h')
0 files changed, 0 insertions, 0 deletions