summaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hardware
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2009-11-04 17:30:08 +0100
committerDavid S. Miller <davem@davemloft.net>2009-11-04 17:30:08 +0100
commitb9db21f8b964e158f95bb581c887159b6cb98ffa (patch)
treed479f93280fa29d9c713c2b755359b35686ff61c /drivers/isdn/hardware
parentisdn: eicon: Use offsetof (diff)
downloadlinux-b9db21f8b964e158f95bb581c887159b6cb98ffa.tar.xz
linux-b9db21f8b964e158f95bb581c887159b6cb98ffa.zip
isdn: eicon: Return on error
When diva_strace_read_uint returns an error, return even from process_idi_event, because l2_state is uninitialized. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Karsten Keil <isdn@linux-pingi.de> Acked-by: Armin Schindler <armin@melware.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn/hardware')
-rw-r--r--drivers/isdn/hardware/eicon/maintidi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/isdn/hardware/eicon/maintidi.c b/drivers/isdn/hardware/eicon/maintidi.c
index 23960cb6eaab..41c26e756452 100644
--- a/drivers/isdn/hardware/eicon/maintidi.c
+++ b/drivers/isdn/hardware/eicon/maintidi.c
@@ -959,8 +959,9 @@ static int process_idi_event (diva_strace_context_t* pLib,
}
if (!strncmp("State\\Layer2 No1", path, pVar->path_length)) {
char* tmp = &pLib->lines[0].pInterface->Layer2[0];
- dword l2_state;
- diva_strace_read_uint (pVar, &l2_state);
+ dword l2_state;
+ if (diva_strace_read_uint(pVar, &l2_state))
+ return -1;
switch (l2_state) {
case 0: