Skip to content

Commit 3ba9635

Browse files
Dan Carpentermartinkpetersen
authored andcommitted
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: eab0dce ("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>
1 parent f51d748 commit 3ba9635

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/ufs/host/ufshcd-pltfrm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ static int ufshcd_parse_clock_info(struct ufs_hba *hba)
3131
const char *name;
3232
u32 *clkfreq = NULL;
3333
struct ufs_clk_info *clki;
34-
size_t sz = 0;
34+
ssize_t sz = 0;
3535

3636
if (!np)
3737
goto out;

0 commit comments

Comments
 (0)