diff options
-rw-r--r-- | drivers/spi/spidev.c | 4 |
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, if (u_tmp->rx_buf) { k_tmp->rx_buf = buf; - if (!access_ok(VERIFY_WRITE, u_tmp->rx_buf, u_tmp->len)) + if (!access_ok(VERIFY_WRITE, (u8 __user *) + (ptrdiff_t) u_tmp->rx_buf, + u_tmp->len)) goto done; } if (u_tmp->tx_buf) { |