diff options
author | Benjamin Romer <benjamin.romer@unisys.com> | 2014-11-04 11:25:16 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-11-05 11:50:49 -0800 |
commit | fef483891dc5aaca047fad7cf594651fbda9bef5 (patch) | |
tree | f7333561df72db691dfa8328433ce4cb4857c738 /drivers/staging/unisys | |
parent | b63438c4e33149cf1dfd6f0ffb151e4dd0a65ce7 (diff) | |
download | linux-stable-fef483891dc5aaca047fad7cf594651fbda9bef5.tar.gz linux-stable-fef483891dc5aaca047fad7cf594651fbda9bef5.tar.bz2 linux-stable-fef483891dc5aaca047fad7cf594651fbda9bef5.zip |
staging: unisys: refactor visor_memregion_create()
Fix the sizeof() so it uses the variable name rather than the type, fix the
argument alignment to the kzalloc(), and rename the goto label.
Away => cleanup
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/unisys')
-rw-r--r-- | drivers/staging/unisys/visorutil/memregion_direct.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/unisys/visorutil/memregion_direct.c b/drivers/staging/unisys/visorutil/memregion_direct.c index 73228d2da30f..3f1f313f0deb 100644 --- a/drivers/staging/unisys/visorutil/memregion_direct.c +++ b/drivers/staging/unisys/visorutil/memregion_direct.c @@ -41,8 +41,8 @@ struct memregion * visor_memregion_create(HOSTADDRESS physaddr, ulong nbytes) { struct memregion *rc = NULL; - struct memregion *memregion = kzalloc(sizeof(struct memregion), - GFP_KERNEL | __GFP_NORETRY); + struct memregion *memregion = kzalloc(sizeof(*memregion), + GFP_KERNEL | __GFP_NORETRY); if (memregion == NULL) { ERRDRV("visor_memregion_create allocation failed"); return NULL; @@ -52,10 +52,10 @@ visor_memregion_create(HOSTADDRESS physaddr, ulong nbytes) memregion->overlapped = FALSE; if (!mapit(memregion)) { rc = NULL; - goto Away; + goto cleanup; } rc = memregion; -Away: +cleanup: if (rc == NULL) { if (memregion != NULL) { visor_memregion_destroy(memregion); |