From: Ben Marsh Date: Mon, 1 Feb 2016 13:12:32 +0000 (+0100) Subject: Staging: Android: memory allocation style change in ion_page_pool.c X-Git-Tag: v4.14-rc1~3621^2~1190 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8fb78ad6e55d8456de9202279b8463f26b012088;p=platform%2Fkernel%2Flinux-rpi.git Staging: Android: memory allocation style change in ion_page_pool.c This is a patch to ion_page_pool.c that changes a memory allocation style issue as found by checkpatch.pl. Signed-off-by: Ben Marsh Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/android/ion/ion_page_pool.c b/drivers/staging/android/ion/ion_page_pool.c index fd7e23e..1fe8016 100644 --- a/drivers/staging/android/ion/ion_page_pool.c +++ b/drivers/staging/android/ion/ion_page_pool.c @@ -149,8 +149,8 @@ int ion_page_pool_shrink(struct ion_page_pool *pool, gfp_t gfp_mask, struct ion_page_pool *ion_page_pool_create(gfp_t gfp_mask, unsigned int order) { - struct ion_page_pool *pool = kmalloc(sizeof(struct ion_page_pool), - GFP_KERNEL); + struct ion_page_pool *pool = kmalloc(sizeof(*pool), GFP_KERNEL); + if (!pool) return NULL; pool->high_count = 0;