gadget: f_thor: fix wrong file size cast 22/245822/2 old/tizen_20201104 accepted/tizen/unified/20201028.123848 submit/tizen/20201027.003535
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Fri, 16 Oct 2020 06:56:20 +0000 (15:56 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Fri, 16 Oct 2020 07:17:13 +0000 (16:17 +0900)
commit23f6513ff6c92116045f044bd275659187dfae02
tree55a5dd7602fb5c3ee1e019c0c166fbcf06566047
parent67184eead8c8ef4bd340ac2155a2e573e39fc95d
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