From: Axel Lin Date: Tue, 25 Feb 2014 11:19:43 +0000 (+0800) Subject: spi: txx9: Let spi core handle validating transfer length X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f8c717a567158cdd703b39118eec20cfffdcf585;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git spi: txx9: Let spi core handle validating transfer length spi core will handle validating transfer length since commit 4d94bd21b333 "spi: core: Validate length of the transfers in message". So remove the same checking in this driver. Signed-off-by: Axel Lin Reviewed-by: Atsushi Nemoto Signed-off-by: Mark Brown --- diff --git a/drivers/spi/spi-txx9.c b/drivers/spi/spi-txx9.c index 5cfaafc368fc..820b499816f8 100644 --- a/drivers/spi/spi-txx9.c +++ b/drivers/spi/spi-txx9.c @@ -306,12 +306,8 @@ static int txx9spi_transfer(struct spi_device *spi, struct spi_message *m) /* check each transfer's parameters */ list_for_each_entry(t, &m->transfers, transfer_list) { - u8 bits_per_word = t->bits_per_word; - if (!t->tx_buf && !t->rx_buf && t->len) return -EINVAL; - if (t->len & ((bits_per_word >> 3) - 1)) - return -EINVAL; } spin_lock_irqsave(&c->lock, flags);