From patchwork Wed Mar 5 05:34:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 3770731 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 6FE1F9F376 for ; Wed, 5 Mar 2014 05:34:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9A58320225 for ; Wed, 5 Mar 2014 05:34:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C8B0F20221 for ; Wed, 5 Mar 2014 05:34:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751569AbaCEFe2 (ORCPT ); Wed, 5 Mar 2014 00:34:28 -0500 Received: from mail-pa0-f43.google.com ([209.85.220.43]:59203 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751374AbaCEFe1 (ORCPT ); Wed, 5 Mar 2014 00:34:27 -0500 Received: by mail-pa0-f43.google.com with SMTP id bj1so605385pad.2 for ; Tue, 04 Mar 2014 21:34:27 -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=1orFw5M65FfpwhIk7qaN/b231aJwcHJS6TT2tsiU6Eo=; b=fQgB15e8AFQV7ySL1JMf2MsC4p5OYxuJFZFOJxG9lV12W90AV3edpP1AunOg8lCdJa PlMGCJ32ieQd6tIUfnV/SsCnj2bl4iEFeiwFrk/gULqNejnSAohkAfvnjGOwlxS4Gmqj RTw/VoZ9o6AfjvvLxZpc7z+D2Fdw1gGpY+F9nX1+PabcnDLuxrV6GFnECS2XRWLyMsFf sSPT7/RuODRO3qA3CB2dUODsYbqOQtlGwLbh5eOOgG5s6nWBbWXElUm6buAkGx+zzrj+ WG24TVwSA2QlOkL0amzDGxlX/xfGzRyfyKbnrjMQG2mW5HhPkMS8X/w+6+0aioAW0Mtj YzYg== X-Gm-Message-State: ALoCoQkgfj90ZDmEdQhzX/HXyQplGiZ3Vj/jONV3Jac2jgGxLL0+zfPjK6BX0120Pm30M3EP0pym X-Received: by 10.69.25.69 with SMTP id io5mr4614078pbd.22.1393997667259; Tue, 04 Mar 2014 21:34:27 -0800 (PST) Received: from [192.168.0.102] (218-164-139-107.dynamic.hinet.net. [218.164.139.107]) by mx.google.com with ESMTPSA id ha11sm3616881pbd.17.2014.03.04.21.34.24 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 04 Mar 2014 21:34:26 -0800 (PST) Message-ID: <1393997661.19790.0.camel@phoenix> Subject: [PATCH] spi: oc-tiny: Remove unneeded NULL checking for hw->bitbang.master From: Axel Lin To: Mark Brown Cc: Thomas Chou , linux-spi@vger.kernel.org Date: Wed, 05 Mar 2014 13:34:21 +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=-6.9 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-oc-tiny.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/spi/spi-oc-tiny.c b/drivers/spi/spi-oc-tiny.c index 022774e..8998d11 100644 --- a/drivers/spi/spi-oc-tiny.c +++ b/drivers/spi/spi-oc-tiny.c @@ -266,8 +266,6 @@ static int tiny_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.setup_transfer = tiny_spi_setup_transfer; hw->bitbang.chipselect = tiny_spi_chipselect; hw->bitbang.txrx_bufs = tiny_spi_txrx_bufs;