On Thu, Apr 17, 2014 at 04:31:44PM +0300, Alexandr Terekhov wrote: > Fix naked sscanf > > Signed-off-by: Alexandr Terekhov <Alexandr_Terekhov@xxxxxxxx> > > diff --git a/drivers/staging/gdm72xx/gdm_wimax.c b/drivers/staging/gdm72xx/gdm_wimax.c > index 05ce2a2..7f60da3 100644 > --- a/drivers/staging/gdm72xx/gdm_wimax.c > +++ b/drivers/staging/gdm72xx/gdm_wimax.c > @@ -285,6 +285,7 @@ static void __gdm_wimax_event_send(struct work_struct *work) > int idx; > unsigned long flags; > struct evt_entry *e; > + int rc; > > spin_lock_irqsave(&wm_event.evt_lock, flags); > > @@ -292,7 +293,10 @@ 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); > + rc = sscanf(e->dev->name, "wm%d", &idx); > + if (0 == rc) Kernel style is the other way around, or just "if (rc)" _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel