From patchwork Wed Feb 19 11:53:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 3680391 X-Patchwork-Delegate: broonie@sirena.org.uk Return-Path: X-Original-To: patchwork-linux-spi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CDAFF9F2EC for ; Wed, 19 Feb 2014 11:53:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 11808201F0 for ; Wed, 19 Feb 2014 11:53:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 52A412013A for ; Wed, 19 Feb 2014 11:53:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752545AbaBSLxU (ORCPT ); Wed, 19 Feb 2014 06:53:20 -0500 Received: from mail-pd0-f172.google.com ([209.85.192.172]:37691 "EHLO mail-pd0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751327AbaBSLxT (ORCPT ); Wed, 19 Feb 2014 06:53:19 -0500 Received: by mail-pd0-f172.google.com with SMTP id p10so275182pdj.31 for ; Wed, 19 Feb 2014 03:53:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:subject:from:to:cc:date:content-type :mime-version:content-transfer-encoding; bh=/YXiVo4ksRAaOd6FbxrbPcB+s25YXDtQ9vey5P8UqiE=; b=QGiDV4yCFI7YEAWjjHRWhiJHdwZUcW6vNVP06mvUl954wq7wyHR4qdXgGL+CoJWmFu Xn/V/UnUiWo+DMOr9fJzkziUA1zbnRhCrR6NOi5gluYa/3hyWsd7gjQQdMx42MWtPa2c 2pO9/nOr72DG9/3ZOjhPcsGjZc95/IZOd9bpft+CqzGdyvpGDbiekGoTl/hWUjAOVpe4 TSWrHpL3yAstEl9I/TdiZ5q5qsW7JsfUvwj5l1Wpr18qatU1WyXCfkR8vupPfiVJlZOF xB0meWMlFCyHM4dDuIaPOyg+noCgmnRWrmhLnAFpe5rBNr8dKdKPNhMJGzVyN5/vcMQM M3yw== X-Gm-Message-State: ALoCoQmdV/upmVS/1bg95LRMtQmxwUNT0yU3h8+i/IdBsOjNE+gw3iz5C4j6F9Su0Lu+BmM7ZCiN X-Received: by 10.66.146.229 with SMTP id tf5mr1805767pab.50.1392810799118; Wed, 19 Feb 2014 03:53:19 -0800 (PST) Received: from [192.168.0.102] (218-164-139-158.dynamic.hinet.net. [218.164.139.158]) by mx.google.com with ESMTPSA id rb6sm64998710pbb.41.2014.02.19.03.53.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 19 Feb 2014 03:53:17 -0800 (PST) Message-ID: <1392810792.9749.0.camel@phoenix> Subject: [PATCH] spi: atmel: Remove redundant list_empty checking From: Axel Lin To: Mark Brown Cc: Richard Genoud , Nicolas Ferre , linux-spi@vger.kernel.org Date: Wed, 19 Feb 2014 19:53:12 +0800 X-Mailer: Evolution 3.6.4-0ubuntu1 Mime-Version: 1.0 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This checking is already done in __spi_validate(). Signed-off-by: Axel Lin --- drivers/spi/spi-atmel.c | 3 --- 1 file changed, 3 deletions(-) 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);