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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Manivannan Sadhasivam <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent f51d748 commit 3ba9635

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)