From patchwork Sun Jan 12 06:38:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 3470891 Return-Path: X-Original-To: patchwork-linux-spi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 84C16C02DC for ; Sun, 12 Jan 2014 06:38:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9B29620122 for ; Sun, 12 Jan 2014 06:38:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D6BE3200FF for ; Sun, 12 Jan 2014 06:38:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750996AbaALGiV (ORCPT ); Sun, 12 Jan 2014 01:38:21 -0500 Received: from mail-pb0-f54.google.com ([209.85.160.54]:40136 "EHLO mail-pb0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750982AbaALGiV (ORCPT ); Sun, 12 Jan 2014 01:38:21 -0500 Received: by mail-pb0-f54.google.com with SMTP id un15so6143889pbc.27 for ; Sat, 11 Jan 2014 22:38:20 -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=rpsQrkuJgdJ6eDj+NsZ/LCw8rQodD8UhkQQsiSPE4gM=; b=A+m2dj5v2TxW1X9oi3SIba90JOXpRh4RX61wyDSFCkLnRqSAlMfqIElGivkVmP/UI1 1+Qfs7eauxbwvBe3rSBTNHasjJxtYZEzIBjOc3ZOKt+mDZV4XcE8Kc6BQjUWFjttA7ZI 5lPQqPWrvFC3Sr2222X1RkwaRGwQzs+DAT8+pmo2u1my6ENG/3PLyE58z4UOiIjSYqRX 5GlB9gmRMFVLnfVZqGP7GJv6i6WxklbY9COZmqmC7cjrWsqhcT5voMVFGzlikYDEbPfD QcLbmB8lSHp5OkQdnInTN/+MEAArW7j3bHn2tPoftiGUTHIYbEdrKAsYZbeD4/FX8gQG ZC+g== X-Gm-Message-State: ALoCoQlqWY/uJfKrAtjPIAATyRRp4ZAowJkEtPldVagDV0hHycTZ2/jlZHB5Ddxc7a9pZp1PVT38 X-Received: by 10.68.230.137 with SMTP id sy9mr21992338pbc.126.1389508699476; Sat, 11 Jan 2014 22:38:19 -0800 (PST) Received: from [192.168.0.102] (218-164-139-128.dynamic.hinet.net. [218.164.139.128]) by mx.google.com with ESMTPSA id sd3sm28748624pbb.42.2014.01.11.22.38.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 11 Jan 2014 22:38:18 -0800 (PST) Message-ID: <1389508694.13361.1.camel@phoenix> Subject: [PATCH] spi: altera: Remove unneeded NULL checking for hw->bitbang.master From: Axel Lin To: Mark Brown Cc: Thomas Chou , linux-spi@vger.kernel.org Date: Sun, 12 Jan 2014 14:38:14 +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.0 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 We already has NULL test for master after calling spi_alloc_master(). Signed-off-by: Axel Lin --- drivers/spi/spi-altera.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/spi/spi-altera.c b/drivers/spi/spi-altera.c index 595b62c..5d7deaf 100644 --- a/drivers/spi/spi-altera.c +++ b/drivers/spi/spi-altera.c @@ -220,8 +220,6 @@ static int altera_spi_probe(struct platform_device *pdev) /* setup the state for the bitbang driver */ hw->bitbang.master = master; - if (!hw->bitbang.master) - return err; hw->bitbang.chipselect = altera_spi_chipsel; hw->bitbang.txrx_bufs = altera_spi_txrx;