From patchwork Mon Aug 17 07:00:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 52467 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by patches.linaro.org (Postfix) with ESMTPS id CC2D72156D for ; Mon, 17 Aug 2015 07:01:15 +0000 (UTC) Received: by wicul11 with SMTP id ul11sf23182952wic.1 for ; Mon, 17 Aug 2015 00:01:15 -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:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=2KcixVdn/IZ23P5Gkg7V9e4N+NLmUdJpoCYXrQdXB/A=; b=WUs0oLEHYDi3pCKoLflrqhGrwXXcveOlDndVPCsEDh79riJPeQSXFNZcXvmXsbOvaC 2wVnoKi5zDHr08UtaauQOCDHJv2kkQj7NlH7iM/DwepKEmfiJG6lj370coKVbAMU9FNK /i1KSR868uK/BjsXkEfxOKiB1NfSlRmefCT/iZzHxL4dUi+m66+mQN3iHHnDNFwXnX45 EJArjeSnfhduzgxCX52Af6IrMw7CYkdXqe3v6Njft5ewz0Rc7gk+S9g4sjHsN+5nqxta J7+FUHK/miWy3+k+HleNUutCbL4gkqaa9gtk5Bfw+hcaR1vyCNk2RchosVRm4r8TbKUw +FjQ== X-Gm-Message-State: ALoCoQn+N41rZjqUpzHW64XHLlf4hMAOhxXbGngcbydjsIwPM9EB0FKvQrYZXLf4oe9MUNxJCgb9 X-Received: by 10.180.79.66 with SMTP id h2mr4501488wix.3.1439794875113; Mon, 17 Aug 2015 00:01:15 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.1.199 with SMTP id 7ls501647lao.67.gmail; Mon, 17 Aug 2015 00:01:14 -0700 (PDT) X-Received: by 10.112.210.137 with SMTP id mu9mr52942601lbc.95.1439794874789; Mon, 17 Aug 2015 00:01:14 -0700 (PDT) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com. [209.85.215.52]) by mx.google.com with ESMTPS id d4si11092518lbp.163.2015.08.17.00.01.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Aug 2015 00:01:14 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) client-ip=209.85.215.52; Received: by labd1 with SMTP id d1so73630943lab.1 for ; Mon, 17 Aug 2015 00:01:14 -0700 (PDT) X-Received: by 10.152.88.78 with SMTP id be14mr53807931lab.29.1439794874587; Mon, 17 Aug 2015 00:01:14 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.7.198 with SMTP id l6csp1258025lba; Mon, 17 Aug 2015 00:01:13 -0700 (PDT) X-Received: by 10.70.54.165 with SMTP id k5mr36291931pdp.138.1439794873520; Mon, 17 Aug 2015 00:01:13 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id hb9si23074551pbd.230.2015.08.17.00.01.12; Mon, 17 Aug 2015 00:01:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752673AbbHQHBI (ORCPT + 28 others); Mon, 17 Aug 2015 03:01:08 -0400 Received: from mail-pa0-f48.google.com ([209.85.220.48]:34054 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750838AbbHQHBH (ORCPT ); Mon, 17 Aug 2015 03:01:07 -0400 Received: by paccq16 with SMTP id cq16so58628105pac.1 for ; Mon, 17 Aug 2015 00:01:06 -0700 (PDT) X-Received: by 10.67.3.129 with SMTP id bw1mr29310908pad.47.1439794866458; Mon, 17 Aug 2015 00:01:06 -0700 (PDT) Received: from localhost ([122.171.186.190]) by smtp.gmail.com with ESMTPSA id qc2sm13380672pbc.79.2015.08.17.00.01.05 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 17 Aug 2015 00:01:05 -0700 (PDT) From: Viresh Kumar To: broonie@kernel.org Cc: linaro-kernel@lists.linaro.org, Viresh Kumar , Liam Girdwood , linux-kernel@vger.kernel.org (open list:VOLTAGE AND CURRENT REGULATOR FRAMEWORK) Subject: [PATCH] regulator: core: Use IS_ERR_OR_NULL() Date: Mon, 17 Aug 2015 12:30:58 +0530 Message-Id: <3608f46110fb5b66e4e94f18a9af3283d4149fe8.1439794825.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.4.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@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.215.52 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Use IS_ERR_OR_NULL() rather than open coding it. Signed-off-by: Viresh Kumar --- drivers/regulator/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 78387a6cbae5..55b49acfd9b3 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -1595,7 +1595,7 @@ static void _regulator_put(struct regulator *regulator) { struct regulator_dev *rdev; - if (regulator == NULL || IS_ERR(regulator)) + if (IS_ERR_OR_NULL(regulator)) return; rdev = regulator->rdev;