diff mbox

[1/2] spi: omap2-mcspi: Remove list_empty checking in omap2_mcspi_transfer_one_message

Message ID 1392732096.22192.0.camel@phoenix (mailing list archive)
State Accepted
Commit cd60080fd6200bd2e5ca9bf5135d32c06a8e6f3b
Headers show

Commit Message

Axel Lin Feb. 18, 2014, 2:01 p.m. UTC
This checking is done in __spi_validate().

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/spi/spi-omap2-mcspi.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Mark Brown Feb. 19, 2014, 4:38 a.m. UTC | #1
On Tue, Feb 18, 2014 at 10:01:36PM +0800, Axel Lin wrote:
> This checking is done in __spi_validate().

Applied both, thanks.
diff mbox

Patch

diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
index 0493905..82cbe73 100644
--- a/drivers/spi/spi-omap2-mcspi.c
+++ b/drivers/spi/spi-omap2-mcspi.c
@@ -1207,9 +1207,6 @@  static int omap2_mcspi_transfer_one_message(struct spi_master *master,
 	m->actual_length = 0;
 	m->status = 0;
 
-	/* reject invalid messages and transfers */
-	if (list_empty(&m->transfers))
-		return -EINVAL;
 	list_for_each_entry(t, &m->transfers, transfer_list) {
 		const void	*tx_buf = t->tx_buf;
 		void		*rx_buf = t->rx_buf;