Commit 81ff542a authored by Borislav Petkov's avatar Borislav Petkov Committed by Greg Kroah-Hartman

[PATCH] USB: remove _some_ calls to usb_unlink_urb in misc/auerswald.c

   here's a more controversial one. Firstly, auerchain_unlink_urb:1180
   is a wrapper for usb_unlink_urb so i don't think we should change
   that. Secondly, auerswald_int_release returns an int which is the
   error code returned by usb_unlink_urb. usb_kill_urb is a void,
   however, so I've removed the error checking. For the sake of
   debugging, the dbg-line announcing the name of the function is
   probably enough.
Signed-off-by: default avatarBorislav Petkov <petkov@uni-muenster.de>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 4afa423c
......@@ -516,7 +516,7 @@ static void auerchain_unlink_all (pauerchain_t acp)
urbp = acep->urbp;
urbp->transfer_flags &= ~URB_ASYNC_UNLINK;
dbg ("unlink active urb");
usb_unlink_urb (urbp);
usb_kill_urb (urbp);
}
}
......@@ -1171,22 +1171,16 @@ static int auerswald_int_open (pauerswald_t cp)
endpoint. This function returns 0 if successful or an error code.
NOTE: no mutex please!
*/
static int auerswald_int_release (pauerswald_t cp)
static void auerswald_int_release (pauerswald_t cp)
{
int ret = 0;
dbg ("auerswald_int_release");
/* stop the int endpoint */
if (cp->inturbp) {
ret = usb_unlink_urb (cp->inturbp);
if (ret)
dbg ("nonzero int unlink result received: %d", ret);
}
if (cp->inturbp)
usb_kill_urb (cp->inturbp);
/* deallocate memory */
auerswald_int_free (cp);
return ret;
}
/* --------------------------------------------------------------------- */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment