projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3cb494c
)
greybus: uart: Fix the memory leak in connection init
author
Phong Tran
<tranmanphong@gmail.com>
Mon, 1 Jun 2015 15:19:45 +0000
(22:19 +0700)
committer
Greg Kroah-Hartman
<gregkh@google.com>
Thu, 4 Jun 2015 05:04:18 +0000
(14:04 +0900)
If alloc minor is error, gb_tty should free.
Signed-off-by: Phong Tran <tranmanphong@gmail.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/uart.c
patch
|
blob
|
history
diff --git
a/drivers/staging/greybus/uart.c
b/drivers/staging/greybus/uart.c
index 47de9698f50c224e82a183b44a0471bcdb1a2397..590bc9f5d0be4ce128dccf6a2ee57cd07f8929e6 100644
(file)
--- a/
drivers/staging/greybus/uart.c
+++ b/
drivers/staging/greybus/uart.c
@@
-618,9
+618,11
@@
static int gb_uart_connection_init(struct gb_connection *connection)
if (minor == -ENOSPC) {
dev_err(&connection->dev,
"no more free minor numbers\n");
- return -ENODEV;
+ retval = -ENODEV;
+ goto error_version;
}
- return minor;
+ retval = minor;
+ goto error_version;
}
gb_tty->minor = minor;