From: Shawn Lin Date: Thu, 10 Mar 2016 06:52:27 +0000 (+0800) Subject: spi: rockchip: covert rsd_nsecs to u32 type X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=108b5c8bba6be101100596bf37a165214e1c8458;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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 Signed-off-by: Mark Brown --- diff --git a/drivers/spi/spi-rockchip.c b/drivers/spi/spi-rockchip.c index 1b54f2f18021..5488597cfad4 100644 --- a/drivers/spi/spi-rockchip.c +++ b/drivers/spi/spi-rockchip.c @@ -173,7 +173,7 @@ struct rockchip_spi { u8 tmode; u8 bpw; u8 n_bytes; - u8 rsd_nsecs; + u32 rsd_nsecs; unsigned len; u32 speed;