Re: [PATCH] tile: add null check for kzalloc in tile/kernel/setup.c

From: Chris Metcalf
Date: Thu Aug 29 2013 - 14:03:04 EST


On 8/21/2013 9:49 PM, Wang Sheng-Hui wrote:
> 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@xxxxxxxxx>
> ---
> arch/tile/kernel/setup.c | 4 ++++
> 1 file changed, 4 insertions(+)

Thanks. Taken into the tile tree.
--
Chris Metcalf, Tilera Corp.
http://www.tilera.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/