summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-rockchip.c
diff options
context:
space:
mode:
authorShawn Lin <shawn.lin@rock-chips.com>2016-03-10 14:52:27 +0800
committerMark Brown <broonie@kernel.org>2016-03-10 15:06:53 +0700
commit108b5c8bba6be101100596bf37a165214e1c8458 (patch)
tree1abe8cc053aac711078c2cafedc3aa5cb0a7dbd5 /drivers/spi/spi-rockchip.c
parentec5c5d8ac028cfec4c7c976d93bed1734f1a670a (diff)
downloadlinux-108b5c8bba6be101100596bf37a165214e1c8458.tar.bz2
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 <shawn.lin@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-rockchip.c')
-rw-r--r--drivers/spi/spi-rockchip.c2
1 files changed, 1 insertions, 1 deletions
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;