]> git.baikalelectronics.ru Git - kernel.git/commit
tile: add null check for kzalloc in tile/kernel/setup.c
authorWang Sheng-Hui <shhuiw@gmail.com>
Thu, 22 Aug 2013 01:49:42 +0000 (21:49 -0400)
committerChris Metcalf <cmetcalf@tilera.com>
Tue, 3 Sep 2013 18:53:34 +0000 (14:53 -0400)
commit2ebbaf2de7718ffa11ad6a217aeeb42a245043e4
tree8ff5c867220173ded9e7de932b9a9759855ec5f1
parent188f68f699a9e629afb67c4508d7c37f3308a3e1
tile: add null check for kzalloc in tile/kernel/setup.c

Should check the return value of kzalloc first to avoid the null pointer.
Then can dereference the non-null pointer to access the fields of struct
resource.

Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
arch/tile/kernel/setup.c