aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spidev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/spi/spidev.c')
-rw-r--r--drivers/spi/spidev.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
index 630f781aeb19..c55459c592b8 100644
--- a/drivers/spi/spidev.c
+++ b/drivers/spi/spidev.c
@@ -183,7 +183,9 @@ static int spidev_message(struct spidev_data *spidev,
183 183
184 if (u_tmp->rx_buf) { 184 if (u_tmp->rx_buf) {
185 k_tmp->rx_buf = buf; 185 k_tmp->rx_buf = buf;
186 if (!access_ok(VERIFY_WRITE, u_tmp->rx_buf, u_tmp->len)) 186 if (!access_ok(VERIFY_WRITE, (u8 __user *)
187 (ptrdiff_t) u_tmp->rx_buf,
188 u_tmp->len))
187 goto done; 189 goto done;
188 } 190 }
189 if (u_tmp->tx_buf) { 191 if (u_tmp->tx_buf) {