diff mbox

spi: atmel: Remove redundant list_empty checking

Message ID 1392810792.9749.0.camel@phoenix (mailing list archive)
State Accepted
Commit 0e6d873ac43c7452d33f7b57b8b91172ad0f78d7
Delegated to: Mark Brown
Headers show

Commit Message

Axel Lin Feb. 19, 2014, 11:53 a.m. UTC
This checking is already done in __spi_validate().

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

Comments

Mark Brown March 3, 2014, 3:56 a.m. UTC | #1
On Wed, Feb 19, 2014 at 07:53:12PM +0800, Axel Lin wrote:
> This checking is already done in __spi_validate().

Applied, thanks.
diff mbox

Patch

diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c
index c3ed7ed..20cfa2d 100644
--- a/drivers/spi/spi-atmel.c
+++ b/drivers/spi/spi-atmel.c
@@ -1213,9 +1213,6 @@  static int atmel_spi_transfer_one_message(struct spi_master *master,
 	dev_dbg(&spi->dev, "new message %p submitted for %s\n",
 					msg, dev_name(&spi->dev));
 
-	if (unlikely(list_empty(&msg->transfers)))
-		return -EINVAL;
-
 	atmel_spi_lock(as);
 	cs_activate(as, spi);