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:
332e008
)
SUNRPC: remove BUG_ON in svc_register
author
Weston Andros Adamson
<dros@netapp.com>
Tue, 23 Oct 2012 14:43:45 +0000
(10:43 -0400)
committer
Trond Myklebust
<Trond.Myklebust@netapp.com>
Sun, 4 Nov 2012 19:43:42 +0000
(14:43 -0500)
Instead of calling BUG_ON(), do a WARN_ON_ONCE() and return -EINVAL.
Signed-off-by: Weston Andros Adamson <dros@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
net/sunrpc/svc.c
patch
|
blob
|
blame
|
history
diff --git
a/net/sunrpc/svc.c
b/net/sunrpc/svc.c
index 3bf5a54982ba3834b8cc1db9fc242fbca1220f76..dfa4ba69ff4503748ed22bad836643540221af39 100644
(file)
--- a/
net/sunrpc/svc.c
+++ b/
net/sunrpc/svc.c
@@
-950,7
+950,9
@@
int svc_register(const struct svc_serv *serv, struct net *net,
unsigned int i;
int error = 0;
- BUG_ON(proto == 0 && port == 0);
+ WARN_ON_ONCE(proto == 0 && port == 0);
+ if (proto == 0 && port == 0)
+ return -EINVAL;
for (progp = serv->sv_program; progp; progp = progp->pg_next) {
for (i = 0; i < progp->pg_nvers; i++) {