projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2a8a4b7
)
Staging: ti-st: writing past end of array
author
Dan Carpenter
<error27@gmail.com>
Tue, 10 Aug 2010 05:36:24 +0000
(07:36 +0200)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Tue, 31 Aug 2010 21:48:09 +0000
(14:48 -0700)
In the original source it would write past the end of the array before
returning the error code.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/ti-st/st_core.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/staging/ti-st/st_core.c
b/drivers/staging/ti-st/st_core.c
index 063c9b1db1ab655504f5908e7c4598418dafd0fd..0dfed21721e5c9066b6e80570122692a6ea079e4 100644
(file)
--- a/
drivers/staging/ti-st/st_core.c
+++ b/
drivers/staging/ti-st/st_core.c
@@
-686,9
+686,8
@@
long st_register(struct st_proto_s *new_proto)
default:
pr_err("%d protocol not supported",
new_proto->type);
- err = -EPROTONOSUPPORT;
- /* something wrong */
- break;
+ spin_unlock_irqrestore(&st_gdata->lock, flags);
+ return -EPROTONOSUPPORT;
}
st_gdata->list[new_proto->type] = new_proto;
st_gdata->protos_registered++;