at91_wakeup is always returning -EINVAL.
But usb_gadget_wakeup expects 0 on success and negative number on
failure. As per current implementation this function wont fail.
This patch removes unneeded variable and returns 0.
Issue identified by coccicheck
drivers/usb/gadget/udc/at91_udc.c:802:6-12:
Unneeded variable: "status". Return "- EINVAL" on line 821
Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
{
struct at91_udc *udc = to_udc(gadget);
u32 glbstate;
- int status = -EINVAL;
unsigned long flags;
DBG("%s\n", __func__ );
done:
spin_unlock_irqrestore(&udc->lock, flags);
- return status;
+ return 0;
}
/* reinit == restore initial software state */