projects
/
kernel
/
kernel-generic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6997561
)
Input: libps2 - warn instead of oopsing when passed bad arguments
author
Dmitry Torokhov
<dtor@insightbb.com>
Fri, 7 Jul 2006 03:54:48 +0000
(23:54 -0400)
committer
Dmitry Torokhov
<dtor@insightbb.com>
Fri, 7 Jul 2006 03:54:48 +0000
(23:54 -0400)
This is more user-friendly and also fixes Coverity #id 249
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/serio/libps2.c
patch
|
blob
|
history
diff --git
a/drivers/input/serio/libps2.c
b/drivers/input/serio/libps2.c
index
61a6f97
..
ed202f2
100644
(file)
--- a/
drivers/input/serio/libps2.c
+++ b/
drivers/input/serio/libps2.c
@@
-177,6
+177,11
@@
int ps2_command(struct ps2dev *ps2dev, unsigned char *param, int command)
return -1;
}
+ if (send && !param) {
+ WARN_ON(1);
+ return -1;
+ }
+
mutex_lock_nested(&ps2dev->cmd_mutex, SINGLE_DEPTH_NESTING);
serio_pause_rx(ps2dev->serio);