Skip to content

Commit

Permalink
drivers/usb/misc/auerswald: fix status check, remove redundant check
Browse files Browse the repository at this point in the history
1) We should only set 'actual_length' output variable if usb length is
known to be good.

2) No need to check actual_length for NULL.  The only caller always
passes non-NULL value.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Jeff Garzik committed Jul 17, 2007
1 parent cad1b9d commit ae97fec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/misc/auerswald.c
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ static int auerchain_start_wait_urb (pauerchain_t acp, struct urb *urb, int time
} else
status = urb->status;

if (actual_length)
if (status >= 0)
*actual_length = urb->actual_length;

return status;
Expand Down

0 comments on commit ae97fec

Please sign in to comment.