Skip to content

Commit 98da66a

Browse files
tobluxgregkh
authored andcommitted
usb: storage: realtek_cr: Use correct byte order for bcs->Residue
Since 'bcs->Residue' has the data type '__le32', convert it to the correct byte order of the CPU using this driver when assigning it to the local variable 'residue'. Cc: stable <[email protected]> Fixes: 50a6cb9 ("USB: usb_storage: add ums-realtek driver") Suggested-by: Alan Stern <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Thorsten Blum <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 421255a commit 98da66a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/storage/realtek_cr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ static int rts51x_bulk_transport(struct us_data *us, u8 lun,
252252
return USB_STOR_TRANSPORT_ERROR;
253253
}
254254

255-
residue = bcs->Residue;
255+
residue = le32_to_cpu(bcs->Residue);
256256
if (bcs->Tag != us->tag)
257257
return USB_STOR_TRANSPORT_ERROR;
258258

0 commit comments

Comments
 (0)