[PATCH 4/7] cfag12864b: Return directly after a failed get_zeroed_page()

SF Markus Elfring
2016-09-10T14:28:30Z

Date: Sat, 10 Sep 2016 15:30:56 +0200

* Return directly after a call of the function "get_zeroed_page" failed
at the beginning.

* Delete the jump label "none" which became unnecessary with
this refactoring.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/auxdisplay/cfag12864b.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/auxdisplay/cfag12864b.c b/drivers/auxdisplay/cfag12864b.c
index 921e177..2fa149b 100644
--- a/drivers/auxdisplay/cfag12864b.c
+++ b/drivers/auxdisplay/cfag12864b.c
@@ -343,8 +343,7 @@ static int __init cfag12864b_init(void)
if (cfag12864b_buffer == NULL) {
printk(KERN_ERR CFAG12864B_NAME ": ERROR: "
"can't get a free page\n");
- ret = -ENOMEM;
- goto none;
+ return -ENOMEM;
}

cfag12864b_cache = kmalloc_array(CFAG12864B_SIZE,
@@ -370,8 +369,6 @@ cachealloced:

bufferalloced:
free_page((unsigned long) cfag12864b_buffer);
-
-none:
return ret;
}

--
2.10.0