From patchwork Thu Apr 10 14:19:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 28191 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f71.google.com (mail-oa0-f71.google.com [209.85.219.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6F5F820671 for ; Thu, 10 Apr 2014 14:19:46 +0000 (UTC) Received: by mail-oa0-f71.google.com with SMTP id j17sf18288719oag.10 for ; Thu, 10 Apr 2014 07:19:45 -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:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=ZqUi6QQCmLaMQATGe8Q5pJXZyiacM/gJ4w5QHc54cZA=; b=ZIdE8G1ftJ+kTVyrzOjdZCyATVlACMbpDwFNnTrvomIyGPDdD77b0lIp1rzUrU92lW V/W0ZEA9QVqoSB5di/DBI94jRnaoGF3cg168S9fXwWZIU/sDCGkT91PnboJ8x9qJ8ApI bGOhrLbZQp/NV44AULi/Qtdm3ADQ1iE5gMFIDkYxoAvOeNVFCV6bmgoeK9oTnMAIfkRh pwuuwlzxuKEaw4XkEHfq3GkuflsgqXugS01JH6RTcphOZYksVRkSIk2jffgVUluYf5u/ xXnuvdOh/sc2Yi8+sVkM494HtwpgpDAQG/n88HoB43f/6vKK8wRrj5H1Jto/6QLGiZGp y7Pw== X-Gm-Message-State: ALoCoQmgd+5xrc8KoQXdSg+MBPVaee/P9BcRmcXPrIFvxH957T8XLa1VuzHvnHpKVvxFSA+j5Jb6 X-Received: by 10.182.24.5 with SMTP id q5mr8270287obf.23.1397139585590; Thu, 10 Apr 2014 07:19:45 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.95.66 with SMTP id h60ls1107807qge.54.gmail; Thu, 10 Apr 2014 07:19:45 -0700 (PDT) X-Received: by 10.52.173.165 with SMTP id bl5mr12149848vdc.13.1397139585458; Thu, 10 Apr 2014 07:19:45 -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 sn5si714716vdc.101.2014.04.10.07.19.45 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Apr 2014 07:19:45 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.179 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.179; Received: by mail-vc0-f179.google.com with SMTP id ij19so3558302vcb.10 for ; Thu, 10 Apr 2014 07:19:45 -0700 (PDT) X-Received: by 10.220.105.4 with SMTP id r4mr792823vco.27.1397139585372; Thu, 10 Apr 2014 07:19:45 -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.220.221.72 with SMTP id ib8csp63229vcb; Thu, 10 Apr 2014 07:19:44 -0700 (PDT) X-Received: by 10.194.173.193 with SMTP id bm1mr2595168wjc.55.1397139584414; Thu, 10 Apr 2014 07:19:44 -0700 (PDT) Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by mx.google.com with ESMTPS id r9si2795502wij.9.2014.04.10.07.19.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Apr 2014 07:19:44 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.178 is neither permitted nor denied by best guess record for domain of ulf.hansson@linaro.org) client-ip=209.85.212.178; Received: by mail-wi0-f178.google.com with SMTP id bs8so5057154wib.17 for ; Thu, 10 Apr 2014 07:19:43 -0700 (PDT) X-Received: by 10.194.20.229 with SMTP id q5mr472819wje.86.1397139583839; Thu, 10 Apr 2014 07:19:43 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id s3sm6771102wje.36.2014.04.10.07.19.42 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Apr 2014 07:19:43 -0700 (PDT) From: Ulf Hansson To: Wolfram Sang , linux-i2c@vger.kernel.org Cc: Linus Walleij , Alessandro Rubini , linux-arm-kernel@lists.infradead.org, Ulf Hansson Subject: [PATCH] i2c: nomadik: Don't use IS_ERR for devm_ioremap Date: Thu, 10 Apr 2014 16:19:29 +0200 Message-Id: <1397139569-3906-1-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ulf.hansson@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.179 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) 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: , devm_ioremap() returns NULL on error, not an error. Cc: Alessandro Rubini Cc: Linus Walleij Signed-off-by: Ulf Hansson Acked-by: Linus Walleij --- drivers/i2c/busses/i2c-nomadik.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-nomadik.c b/drivers/i2c/busses/i2c-nomadik.c index 28cbe1b..32c85e9 100644 --- a/drivers/i2c/busses/i2c-nomadik.c +++ b/drivers/i2c/busses/i2c-nomadik.c @@ -999,7 +999,7 @@ static int nmk_i2c_probe(struct amba_device *adev, const struct amba_id *id) dev->virtbase = devm_ioremap(&adev->dev, adev->res.start, resource_size(&adev->res)); - if (IS_ERR(dev->virtbase)) { + if (!dev->virtbase) { ret = -ENOMEM; goto err_no_mem; }