提交 a29b1857 编写于 作者: B Ben Chan 提交者: Greg Kroah-Hartman

staging: gdm72xx: check return value of sscanf

Signed-off-by: NBen Chan <benchan@chromium.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 7bb3c798
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册