Skip to content

Commit 108b5c8

Browse files
shawn1221broonie
authored andcommitted
spi: rockchip: covert rsd_nsecs to u32 type
rsd_nsecs is defined as u8 memeber of struct rockchip_spi, but using of_property_read_u32. That means we take risk of truncation by type conversion if we pass on big value from dt. Signed-off-by: Shawn Lin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent ec5c5d8 commit 108b5c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/spi/spi-rockchip.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ struct rockchip_spi {
173173
u8 tmode;
174174
u8 bpw;
175175
u8 n_bytes;
176-
u8 rsd_nsecs;
176+
u32 rsd_nsecs;
177177
unsigned len;
178178
u32 speed;
179179

0 commit comments

Comments
 (0)