gadget: f_thor: fix wrong file size cast
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Fri, 16 Oct 2020 06:56:20 +0000 (15:56 +0900)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Mon, 15 Nov 2021 10:37:12 +0000 (11:37 +0100)
commit42781982440c066b496f8cd3cc67bc516c2b1284
tree387496e24a20cc676714c2fc71a7c4822dbbf488
parentb02a08257c9bc34185d73a5498199b80a7a657a6
gadget: f_thor: fix wrong file size cast

Casting 32bit int value directly into 64bit unsigned type causes
wrong value for file size equal or larger than 2GB. Fix the wrong
file size by casting uint32_t first.

Change-Id: I7b344856e2cabfb31ef05521c09914599163d923
Fixes: commit 1fe9ae76b113 ("gadget: f_thor: update to support more than 4GB file as thor 5.0")
Reported-by: Junghoon Kim <jhoon20.kim@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
drivers/usb/gadget/f_thor.c