From patchwork Tue Jun 27 09:26:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 106407 Delivered-To: patch@linaro.org Received: by 10.140.101.48 with SMTP id t45csp996145qge; Tue, 27 Jun 2017 02:28:48 -0700 (PDT) X-Received: by 10.98.213.131 with SMTP id d125mr4234225pfg.79.1498555728254; Tue, 27 Jun 2017 02:28:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498555728; cv=none; d=google.com; s=arc-20160816; b=otMf91yIq4K1wbt/CIzs+kqCZgI9/riR6L+MdLW04hxpufO1Krdg2Ny5obtkm1GHvp SURICTe72S5Mt0gO80iP/osiIlbUtsDLzafOUdMLxjS7O0s3xnVyLUjaPMucUeWzbQAr mR6W3zigEEJhXAkORovDdjmsKakvPIaRYAdjgSHfaclxais6joRJ6X9J7XrL9iZ3fZxQ K7DtAJ6FUiVoFA7ZTDooRwXL48yTjeaV2z+UViOiLHfYMP8lLDlPjmQPM1Jxx7ubfNY0 OP0niwOk8cuzr70zyd0yImxHfJaTPchvwATk9D4e/2CH/+i3ClyYkpZakFDM6KCO/bE1 6WfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=t5lolMpwJuVYvklJf57sXrTc5KoJkbHux/Gddyzv3sc=; b=j73tEPSH1pPoNLONMdemGf8ZU7pWmpd83YQiAUIFfSCVLgW5pFbzLXBmgUW+EKNRyM Y1GaFYBWpUDTOQ1PD2Vq6Jw40CXH12E7RcFjWrmtC4LSKmhaT+5xWtq6h8EcHq449sZZ Mm8qHU1F3psMG4iyJu0X/FjZjB6TI2/gpUv0PZIc0NOkiji4/T+J0wKVX8CMaTi7e/vR qVhZmR/MbXX+1ox+2Df6UkrCnBJuHlnmTvfMfVQQ48zBHH/c9IGuL5KyzD8Woz9ctZ+R p8buWHBdvkvtGEMWZKsvW4EVqTtrUjra8QHWnCwmuKIAEJYJ25O50JqLmgsUBBYmuXvL s66A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=KihvZEkM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g2si1614652pge.249.2017.06.27.02.28.47; Tue, 27 Jun 2017 02:28:48 -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; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.b=KihvZEkM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752445AbdF0J2f (ORCPT + 25 others); Tue, 27 Jun 2017 05:28:35 -0400 Received: from mail-wm0-f45.google.com ([74.125.82.45]:36602 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752071AbdF0J21 (ORCPT ); Tue, 27 Jun 2017 05:28:27 -0400 Received: by mail-wm0-f45.google.com with SMTP id 62so19021695wmw.1 for ; Tue, 27 Jun 2017 02:28:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=t5lolMpwJuVYvklJf57sXrTc5KoJkbHux/Gddyzv3sc=; b=KihvZEkMmXXZqpFuMzGNodDXq2ZLzCAGS6+TiDEnZ0I7BvwZky5ReAbZUzDA4Vy8c0 KUmvcJ0Q+08Akm2AhJ6MkdXsRjCmZLP8ZQEMHOPB3TTk02FDLnClV4aWAzyZviQ72T3t Q6ArMy8fuzj1wXXG9jspyqhA3+33+isYomHs8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=t5lolMpwJuVYvklJf57sXrTc5KoJkbHux/Gddyzv3sc=; b=dUQrYJNhKA68O3lq7SwWctpx2zk1hOy/RhXuyDbA8/WwWw5z7Pob+HH4Ul2J1WIqsm gD+pvor7y/cHxaup/cYjAmyMcc4d+qI6JOO88tsnCdhsCeRRU9bTeu2VICFIQAEZCt17 ojJR81awuPBO1Hp/dOM6fDQ3pPJe8/MgkUqWYgOXyVjncEiEJgrTiPS/cn7KzTUWIGJv RvCPos0psdxnJzDBUp+iTwLcc9RfhwsHoZPFnKJtSEP9yHHblMaQIN3hAtvbUbIE8Eid Fssr9Gc3UJ0xgKuHdePIvO6rv2i8KnayZPn3KNfbhwqCadMYt+kj6f30ZR9Q7T9/PvV/ ucuA== X-Gm-Message-State: AKS2vOwjgkqF+MPWZL8jxsgKVTTIbVuQ9q6XVLi8y8+GdxA++bwZYMDp Kpu2Elt+87T5Npzp X-Received: by 10.28.21.80 with SMTP id 77mr2454648wmv.79.1498555705984; Tue, 27 Jun 2017 02:28:25 -0700 (PDT) Received: from localhost.localdomain ([2a01:e35:879a:6cd0:110f:661:6b72:192e]) by smtp.gmail.com with ESMTPSA id g2sm16159798wrg.69.2017.06.27.02.28.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 27 Jun 2017 02:28:25 -0700 (PDT) From: Daniel Lezcano To: tglx@linutronix.de Cc: linux-kernel@vger.kernel.org Subject: [PATCH 1/5] clocksource/drivers/timer-of: Fix invalid iomap check Date: Tue, 27 Jun 2017 11:26:56 +0200 Message-Id: <1498555620-25094-1-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <20170627092239.GE2479@mai> References: <20170627092239.GE2479@mai> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A typo in the code checks the return value of iomap against !NULL and, thus, fails everytime the mapping succeed. Fix this by inverting the condition in the check. Signed-off-by: Daniel Lezcano --- drivers/clocksource/timer-of.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/clocksource/timer-of.c b/drivers/clocksource/timer-of.c index 64b1c20..f6e7491 100644 --- a/drivers/clocksource/timer-of.c +++ b/drivers/clocksource/timer-of.c @@ -120,7 +120,7 @@ static __init int timer_base_init(struct device_node *np, const char *name = of_base->name ? of_base->name : np->full_name; of_base->base = of_io_request_and_map(np, of_base->index, name); - if (of_base->base) { + if (!of_base->base) { pr_err("Failed to iomap (%s)\n", name); return -ENXIO; }