From patchwork Wed Mar 19 03:59:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 3857171 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 010379F3FF for ; Wed, 19 Mar 2014 18:03:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3838920120 for ; Wed, 19 Mar 2014 18:03:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6E1AA20220 for ; Wed, 19 Mar 2014 18:03:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758333AbaCSD7z (ORCPT ); Tue, 18 Mar 2014 23:59:55 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:36997 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756662AbaCSD7k (ORCPT ); Tue, 18 Mar 2014 23:59:40 -0400 Received: by mail-pa0-f49.google.com with SMTP id lj1so8223660pab.8 for ; Tue, 18 Mar 2014 20:59:39 -0700 (PDT) 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:in-reply-to :references:content-type:mime-version:content-transfer-encoding; bh=0a2IXPooT1HSj6lmvflYA5TaXlp7HrpKAMciBAOWGbk=; b=ISGGLJiQGNQ+HGqOGs8pwFVrS79ZLvm/+Gmqx3FKTv9RzM1gf7PqwOQ14K/JX0pUiy UM1lwcIUJIKfWMBQfwe78p6CUDUl1vqkVFc/UaPPXTOKEIBuaFJUr11qptqAJyOI+V4O vz+MgsXCaOGclYwxb+e9Y0A67/6UeqBv5OcemI3M4PoTxJd4VWZ9+KbJXhe3ddeAXASt lxVbmjRosvQ4fvLpaiNbZWkG3faE+TGR4M+VPSFktNex4fiWNVJdXc93kJoQVYdUJXF/ YsfZktIy6GVCf0CIKS50+BsOAmy2N4SZMe8roMVg3GHautIqdkIh05+djUa6zUcYp2OW JuFw== X-Gm-Message-State: ALoCoQkQhB7vJvVzXOzP3JvZXPfYmbql0X4Fj1l0uRXogywBCGs0It1iM8iWE40l50v62Tcesw4w X-Received: by 10.68.178.1 with SMTP id cu1mr36681848pbc.34.1395201579780; Tue, 18 Mar 2014 20:59:39 -0700 (PDT) Received: from [192.168.0.102] (218-164-140-191.dynamic.hinet.net. [218.164.140.191]) by mx.google.com with ESMTPSA id ug9sm57653622pbc.11.2014.03.18.20.59.37 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 18 Mar 2014 20:59:39 -0700 (PDT) Message-ID: <1395201574.16346.8.camel@phoenix> Subject: [PATCH 6/7] spi: xcomm: Let spi core validate Tx/Rx buffers for non-zero length transfer From: Axel Lin To: Mark Brown Cc: Lars-Peter Clausen , linux-spi@vger.kernel.org Date: Wed, 19 Mar 2014 11:59:34 +0800 In-Reply-To: <1395201227.16346.1.camel@phoenix> References: <1395201227.16346.1.camel@phoenix> X-Mailer: Evolution 3.8.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=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 Signed-off-by: Axel Lin Acked-by: Lars-Peter Clausen --- drivers/spi/spi-xcomm.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/spi/spi-xcomm.c b/drivers/spi/spi-xcomm.c index bb478dc..736a488 100644 --- a/drivers/spi/spi-xcomm.c +++ b/drivers/spi/spi-xcomm.c @@ -149,11 +149,6 @@ static int spi_xcomm_transfer_one(struct spi_master *master, list_for_each_entry(t, &msg->transfers, transfer_list) { - if (!t->tx_buf && !t->rx_buf && t->len) { - status = -EINVAL; - break; - } - status = spi_xcomm_setup_transfer(spi_xcomm, spi, t, &settings); if (status < 0) break;