From: Quentin Lambert Date: Tue, 10 Feb 2015 14:12:07 +0000 (+0100) Subject: staging: unisys: Remove allocation from declaration line X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=ea0dcfcf6d6e76ed4ded11c3027e7f5478746010;p=openwrt%2Fstaging%2Fblogic.git staging: unisys: Remove allocation from declaration line This patch removes allocation from declaration line because people are known to gloss over declarations. Signed-off-by: Quentin Lambert Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index f606ee9e0de9..149d4bc953ac 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -1604,9 +1604,9 @@ parahotplug_next_expiration(void) static struct parahotplug_request * parahotplug_request_create(struct controlvm_message *msg) { - struct parahotplug_request *req = - kmalloc(sizeof(struct parahotplug_request), - GFP_KERNEL|__GFP_NORETRY); + struct parahotplug_request *req; + + req = kmalloc(sizeof(*req), GFP_KERNEL|__GFP_NORETRY); if (req == NULL) return NULL; diff --git a/drivers/staging/unisys/visorutil/charqueue.c b/drivers/staging/unisys/visorutil/charqueue.c index ac7acb7c5b79..e2ee5ee7585e 100644 --- a/drivers/staging/unisys/visorutil/charqueue.c +++ b/drivers/staging/unisys/visorutil/charqueue.c @@ -36,8 +36,9 @@ struct charqueue { struct charqueue *visor_charqueue_create(ulong nslots) { int alloc_size = sizeof(struct charqueue) + nslots + 1; - struct charqueue *cq = kmalloc(alloc_size, GFP_KERNEL|__GFP_NORETRY); + struct charqueue *cq; + cq = kmalloc(alloc_size, GFP_KERNEL|__GFP_NORETRY); if (cq == NULL) { ERRDRV("visor_charqueue_create allocation failed (alloc_size=%d)", alloc_size); diff --git a/drivers/staging/unisys/visorutil/memregion_direct.c b/drivers/staging/unisys/visorutil/memregion_direct.c index 33522cc8c22c..f4ecac0e5092 100644 --- a/drivers/staging/unisys/visorutil/memregion_direct.c +++ b/drivers/staging/unisys/visorutil/memregion_direct.c @@ -41,8 +41,9 @@ struct memregion * visor_memregion_create(HOSTADDRESS physaddr, ulong nbytes) { struct memregion *rc = NULL; - struct memregion *memregion = kzalloc(sizeof(*memregion), - GFP_KERNEL | __GFP_NORETRY); + struct memregion *memregion; + + memregion = kzalloc(sizeof(*memregion), GFP_KERNEL | __GFP_NORETRY); if (memregion == NULL) { ERRDRV("visor_memregion_create allocation failed"); return NULL;