greybus: es1: release urb on error path
authorRui Miguel Silva <rmfrfs@gmail.com>
Tue, 20 Jan 2015 16:38:44 +0000 (16:38 +0000)
committerGreg Kroah-Hartman <greg@kroah.com>
Wed, 21 Jan 2015 01:45:59 +0000 (09:45 +0800)
commit0008d9d0ad0a2e854f2f3f61d58cdc44d98760ff
treeebc319cdcba85f53f79cd6af3c43602963b0a99c
parentb976266051569557377ce63984b1562a8651838c
greybus: es1: release urb on error path

if error is return when submiting the urb, we need to make sure to release the
urb from the pool, or from the dinamicly allocated. As in it, factor out the free
code and create the free_urb function.

Signed-off-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/staging/greybus/gb-es1.c