From patchwork Tue Feb 18 14:01:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 3670951 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 40FB49F2EC for ; Tue, 18 Feb 2014 14:01:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5A42F2016C for ; Tue, 18 Feb 2014 14:01:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8A715201BA for ; Tue, 18 Feb 2014 14:01:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755170AbaBROBm (ORCPT ); Tue, 18 Feb 2014 09:01:42 -0500 Received: from mail-pb0-f49.google.com ([209.85.160.49]:38653 "EHLO mail-pb0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755488AbaBROBl (ORCPT ); Tue, 18 Feb 2014 09:01:41 -0500 Received: by mail-pb0-f49.google.com with SMTP id up15so16608301pbc.8 for ; Tue, 18 Feb 2014 06:01:41 -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=xSNBSGg7H8W6k2Q0xacZgpkaFlE7xL2aGEG0K0qYWuY=; b=N+2wGU/G0QRO1EPLxAzLdDMOVTewFyXlKHTqTcHdDodnl2De5MCdP0MhRpq915FFm8 10wTeYRQZ/v3WHM/uXlxN4yIVsIL9H/At8cjPKAhnyNXiD3OcuVucUrsbH6p890SZm/r vYHwn0lIUf4Bf9E1aQjA/aqDkCpReY1RiGMpUE0HPAzbL+nyv/cl+ri+5OghumCR/biu YAMJ27ZXWb/gyqrEJx4ud0oeOq8CzwGbvr7KAxhgFXFNKo/tAx9GEcupNqXbSi2IhHwI nWSuQ9fowKzhkzuQ16TtZUg0OTqVKi4sQhE6Jp8ZZjD67apIrUScHffWut/zzLOzYL6b izQA== X-Gm-Message-State: ALoCoQmVY0o3NgwIem0PVzZ6Q/5TGRN5ICEqA5l7TG81/GcfXIpzwUblkKx+13Ms9HIz1jqHjBn+ X-Received: by 10.66.136.131 with SMTP id qa3mr32785259pab.77.1392732101032; Tue, 18 Feb 2014 06:01:41 -0800 (PST) Received: from [192.168.0.102] (218-164-138-164.dynamic.hinet.net. [218.164.138.164]) by mx.google.com with ESMTPSA id fk4sm143071585pab.23.2014.02.18.06.01.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 18 Feb 2014 06:01:40 -0800 (PST) Message-ID: <1392732096.22192.0.camel@phoenix> Subject: [PATCH 1/2] spi: omap2-mcspi: Remove list_empty checking in omap2_mcspi_transfer_one_message From: Axel Lin To: Mark Brown Cc: Stefan =?ISO-8859-1?Q?S=F8rensen?= , Victor Kamensky , Illia Smyrnov , linux-spi@vger.kernel.org Date: Tue, 18 Feb 2014 22:01:36 +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 done in __spi_validate(). Signed-off-by: Axel Lin --- drivers/spi/spi-omap2-mcspi.c | 3 --- 1 file changed, 3 deletions(-) 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;