mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 06:01:57 +00:00
scsi: ufs: ufshcd-pltfrm: Signedness bug in ufshcd_parse_clock_info()
The "sz" variable needs to be a signed type for the error handling to work
as intended. Fortunately, there is some sanity checking on "sz" on the
next line, so negative values would be caught and it doesn't really affect
runtime.
Fixes: eab0dce11d
("scsi: ufs: ufshcd-pltfrm: Use of_property_count_u32_elems() to get property length")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/404a4727-89c6-410b-9ece-301fa399d4db@stanley.mountain
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
f51d748195
commit
3ba963597d
@ -31,7 +31,7 @@ static int ufshcd_parse_clock_info(struct ufs_hba *hba)
|
||||
const char *name;
|
||||
u32 *clkfreq = NULL;
|
||||
struct ufs_clk_info *clki;
|
||||
size_t sz = 0;
|
||||
ssize_t sz = 0;
|
||||
|
||||
if (!np)
|
||||
goto out;
|
||||
|
Loading…
Reference in New Issue
Block a user