projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7bb3c79
)
staging: gdm72xx: check return value of sscanf
author
Ben Chan
<benchan@chromium.org>
Wed, 25 Jun 2014 01:11:08 +0000
(18:11 -0700)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Fri, 27 Jun 2014 00:36:57 +0000
(20:36 -0400)
Signed-off-by: Ben Chan <benchan@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/gdm72xx/gdm_wimax.c
patch
|
blob
|
history
diff --git
a/drivers/staging/gdm72xx/gdm_wimax.c
b/drivers/staging/gdm72xx/gdm_wimax.c
index e5e511585122a3a25c5d6ad203d4c5f185755f3f..3081fd46bbda793f6a5c6922afa44b3c5dd49fd8 100644
(file)
--- a/
drivers/staging/gdm72xx/gdm_wimax.c
+++ b/
drivers/staging/gdm72xx/gdm_wimax.c
@@
-291,8
+291,9
@@
static void __gdm_wimax_event_send(struct work_struct *work)
e = list_entry(wm_event.evtq.next, struct evt_entry, list);
spin_unlock_irqrestore(&wm_event.evt_lock, flags);
- sscanf(e->dev->name, "wm%d", &idx);
- netlink_send(wm_event.sock, idx, 0, e->evt_data, e->size);
+ if (sscanf(e->dev->name, "wm%d", &idx) == 1)
+ netlink_send(wm_event.sock, idx, 0, e->evt_data,
+ e->size);
spin_lock_irqsave(&wm_event.evt_lock, flags);
list_del(&e->list);