diff options
author | Ben Chan <benchan@chromium.org> | 2014-06-24 18:11:08 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-06-26 20:36:57 -0400 |
commit | a29b18573a23571daf6610eb95ce9d3efaa47f0e (patch) | |
tree | ee867248e59b349ada08611556c2b3465ceacb3f /drivers/staging/gdm72xx | |
parent | 7bb3c79862be281c4f6cdf49c5f044981f2241a5 (diff) |
staging: gdm72xx: check return value of sscanf
Signed-off-by: Ben Chan <benchan@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/gdm72xx')
-rw-r--r-- | drivers/staging/gdm72xx/gdm_wimax.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/gdm72xx/gdm_wimax.c b/drivers/staging/gdm72xx/gdm_wimax.c index e5e511585122..3081fd46bbda 100644 --- 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); |