From patchwork Thu Aug 28 13:14:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 36196 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yk0-f200.google.com (mail-yk0-f200.google.com [209.85.160.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5BD672054F for ; Thu, 28 Aug 2014 13:14:39 +0000 (UTC) Received: by mail-yk0-f200.google.com with SMTP id 9sf4880990ykp.11 for ; Thu, 28 Aug 2014 06:14: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:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=8in9pous57bC+upvt4w+LZYBV06PeP9tJeLuMwMK92Y=; b=GoNuK01yUk8c7MLrBF0Ks1n4NxCe8YhiEPehPBJawCEpT5BMBG1U2TRrf5JqGZ4ypJ CoMqofSUpbNdKhzXxfTDtAM8ortLiblzYXH4hNKYgibvfO6ZyUlxQ9xBByicKNnrLXQh O06LAXLOJn6oMLKzh0Ie/TS5xUmho6v/8/N9E0W3u1tFOLEooHBGEVC6XWC3rCht+Axv UYj2r6lzxhxr5/CmD5SR355nBOHosalGswLuVkdtSQWdZlgdXejZtCYQ3KzJBEKV2O5g DTIVGQzU+YUMgImDE5YsdGmU/H+vvQ9fhZLYV9EFhejvTUaAIfdE/ENIS7EIkDDzJrNH vuJw== X-Gm-Message-State: ALoCoQkSAOrL0HaESU1/5HmYP0av4DEC+tev4qnLczZO8yspHa1ZtuWKxFHQerLebML5PHZcROp6 X-Received: by 10.236.7.14 with SMTP id 14mr1840163yho.34.1409231679218; Thu, 28 Aug 2014 06:14:39 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.38.176 with SMTP id t45ls568678qgt.60.gmail; Thu, 28 Aug 2014 06:14:39 -0700 (PDT) X-Received: by 10.52.162.74 with SMTP id xy10mr552993vdb.51.1409231679113; Thu, 28 Aug 2014 06:14:39 -0700 (PDT) Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by mx.google.com with ESMTPS id ej9si3363212vcb.25.2014.08.28.06.14.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Aug 2014 06:14:39 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.179 as permitted sender) client-ip=209.85.220.179; Received: by mail-vc0-f179.google.com with SMTP id hy4so769263vcb.10 for ; Thu, 28 Aug 2014 06:14:39 -0700 (PDT) X-Received: by 10.52.120.51 with SMTP id kz19mr357993vdb.95.1409231679039; Thu, 28 Aug 2014 06:14:39 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.45.67 with SMTP id uj3csp234641vcb; Thu, 28 Aug 2014 06:14:38 -0700 (PDT) X-Received: by 10.42.208.70 with SMTP id gb6mr1057725icb.89.1409231678380; Thu, 28 Aug 2014 06:14:38 -0700 (PDT) Received: from mail-ie0-f178.google.com (mail-ie0-f178.google.com [209.85.223.178]) by mx.google.com with ESMTPS id pk6si9260485igb.3.2014.08.28.06.14.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Aug 2014 06:14:38 -0700 (PDT) Received-SPF: pass (google.com: domain of lee.jones@linaro.org designates 209.85.223.178 as permitted sender) client-ip=209.85.223.178; Received: by mail-ie0-f178.google.com with SMTP id at1so924478iec.9 for ; Thu, 28 Aug 2014 06:14:38 -0700 (PDT) X-Received: by 10.42.12.6 with SMTP id w6mr2152668icw.69.1409231678097; Thu, 28 Aug 2014 06:14:38 -0700 (PDT) Received: from localhost.localdomain (host86-152-0-170.range86-152.btcentralplus.com. [86.152.0.170]) by mx.google.com with ESMTPSA id w8sm16633672igl.13.2014.08.28.06.14.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Aug 2014 06:14:37 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Lee Jones Subject: [PATCH 05/11] mfd: htc-i2cpld: Use '!variable' instead of 'variable == NULL' Date: Thu, 28 Aug 2014 14:14:11 +0100 Message-Id: <1409231657-18294-5-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1409231657-18294-1-git-send-email-lee.jones@linaro.org> References: <1409231657-18294-1-git-send-email-lee.jones@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.179 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This aids in consistency, as the rest of the checks in the file use this notation. Signed-off-by: Lee Jones --- drivers/mfd/htc-i2cpld.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/htc-i2cpld.c b/drivers/mfd/htc-i2cpld.c index 8e3ea07..073e180 100644 --- a/drivers/mfd/htc-i2cpld.c +++ b/drivers/mfd/htc-i2cpld.c @@ -232,7 +232,7 @@ static void htcpld_chip_set(struct gpio_chip *chip, unsigned offset, int val) unsigned long flags; client = chip_data->client; - if (client == NULL) + if (!client) return; spin_lock_irqsave(&chip_data->lock, flags); @@ -373,7 +373,7 @@ static int htcpld_register_chip_i2c( plat_chip_data = &pdata->chip[chip_index]; adapter = i2c_get_adapter(pdata->i2c_adapter_id); - if (adapter == NULL) { + if (!adapter) { /* Eek, no such I2C adapter! Bail out. */ dev_warn(dev, "Chip at i2c address 0x%x: Invalid i2c adapter %d\n", plat_chip_data->addr, pdata->i2c_adapter_id);