aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/serio
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/serio')
-rw-r--r--drivers/input/serio/serport.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/drivers/input/serio/serport.c b/drivers/input/serio/serport.c
index 8755f5f3ad37..0cb7ef59071b 100644
--- a/drivers/input/serio/serport.c
+++ b/drivers/input/serio/serport.c
@@ -124,7 +124,7 @@ static void serport_ldisc_receive(struct tty_struct *tty, const unsigned char *c
124{ 124{
125 struct serport *serport = (struct serport*) tty->disc_data; 125 struct serport *serport = (struct serport*) tty->disc_data;
126 unsigned long flags; 126 unsigned long flags;
127 unsigned int ch_flags; 127 unsigned int ch_flags = 0;
128 int i; 128 int i;
129 129
130 spin_lock_irqsave(&serport->lock, flags); 130 spin_lock_irqsave(&serport->lock, flags);
@@ -133,18 +133,20 @@ static void serport_ldisc_receive(struct tty_struct *tty, const unsigned char *c
133 goto out; 133 goto out;
134 134
135 for (i = 0; i < count; i++) { 135 for (i = 0; i < count; i++) {
136 switch (fp[i]) { 136 if (fp) {
137 case TTY_FRAME: 137 switch (fp[i]) {
138 ch_flags = SERIO_FRAME; 138 case TTY_FRAME:
139 break; 139 ch_flags = SERIO_FRAME;
140 140 break;
141 case TTY_PARITY: 141
142 ch_flags = SERIO_PARITY; 142 case TTY_PARITY:
143 break; 143 ch_flags = SERIO_PARITY;
144 144 break;
145 default: 145
146 ch_flags = 0; 146 default:
147 break; 147 ch_flags = 0;
148 break;
149 }
148 } 150 }
149 151
150 serio_interrupt(serport->serio, cp[i], ch_flags); 152 serio_interrupt(serport->serio, cp[i], ch_flags);