Browse Source

drivers/usb/misc/auerswald: fix status check, remove redundant check

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>
Jeff Garzik 18 năm trước cách đây
mục cha
commit
ae97fec370
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      drivers/usb/misc/auerswald.c

+ 1 - 1
drivers/usb/misc/auerswald.c

@@ -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;