From patchwork Mon Nov 9 10:06:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 56199 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp90745lbb; Mon, 9 Nov 2015 02:07:36 -0800 (PST) X-Received: by 10.68.223.226 with SMTP id qx2mr38623271pbc.157.1447063655914; Mon, 09 Nov 2015 02:07:35 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fl1si21496649pad.11.2015.11.09.02.07.35; Mon, 09 Nov 2015 02:07:35 -0800 (PST) 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; 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; dkim=neutral (body hash did not verify) header.i=@linaro_org.20150623.gappssmtp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752689AbbKIKHb (ORCPT + 28 others); Mon, 9 Nov 2015 05:07:31 -0500 Received: from mail-wm0-f46.google.com ([74.125.82.46]:33460 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751211AbbKIKHV (ORCPT ); Mon, 9 Nov 2015 05:07:21 -0500 Received: by wmec201 with SMTP id c201so71016497wme.0 for ; Mon, 09 Nov 2015 02:07:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro_org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Di+fPY7RPQyjiko3Q+hfsoqJXZevZlbkKcZa7dc5zxw=; b=evvpWkx4IvrNjicJ64EOpjK6hvCESvONcjv1nD6p/q5750dd445W5YrUY20swpISPq VhoN2x1S84mPjfmtuBSB1Ogee+b97KoUXFYfr/Gm7e7dLH6Nmti9u1NooVzel+0Tk0Ea 49Gb+SzEyM//xYiu4qSk7gnrSmYSBJ+4p16erjmDv1PSSoOB1U2y28II4MDP06R4Oxt/ zO7ju/18bwmNF35//SZo/OLW+rs2Ky68gfFc34LPiGda7oWSIWQmhWgVu4G8l0hxKWwI TqpD4TqmgV1RNbAjr85ouZwYQoleiEE8VY/siyH6VSC+W4lfZroXAGR2a1kwry4tj1Qh gXIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Di+fPY7RPQyjiko3Q+hfsoqJXZevZlbkKcZa7dc5zxw=; b=OtcuaphhQDbtKvb5MFq7BcIpTOIsuw1oBddduEjpBeaw1zGoXjupzNjVLNe/SJ5fbM ZOmsZN9n5FjvYbHg0PG+7pW5LpG8dWZo3ElXuRkS+Lu42zXxnuXHSL/rKbo5Exs9onN2 HgVHfKatlYUhhJ32m2Y7HSARpsOeVxCy/cw1R0myWdwtbmmJ/ayO6yxaqjKdOo4JHg2r QHnV81mkk52xlTacBNXntGHuAaS3DWARe3SEku/rmMhOms0ASim4jibEUOuBTTiMGA2f Rs5nP8O0peLZ+yBK2hLVlcT+4V6E6ala6yDSlBwMPFsiJWxuF1GUqlxN9ePPiDrMgrVL fhwg== X-Gm-Message-State: ALoCoQmd67kgeFjKoyDCZnH9ZdY+r8KlJ6mVzp4NvIcP6coeMPlbNxTDWevEpjc1yrsr3QMcHnE/ X-Received: by 10.28.133.133 with SMTP id h127mr26095161wmd.41.1447063640681; Mon, 09 Nov 2015 02:07:20 -0800 (PST) Received: from localhost.localdomain (sju31-1-78-210-255-2.fbx.proxad.net. [78.210.255.2]) by smtp.gmail.com with ESMTPSA id t126sm13384201wmd.23.2015.11.09.02.07.19 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 09 Nov 2015 02:07:20 -0800 (PST) From: Daniel Lezcano To: daniel.lezcano@linaro.org Cc: ysato@users.sourceforge.jp, tglx@linutronix.de, linux-kernel@vger.kernel.org, uclinux-h8-devel@lists.sourceforge.jp (moderated list:H8/300 ARCHITECTURE) Subject: [PATCH 07/15] clocksource/drivers/h8300_timer8: Fix irq return value check Date: Mon, 9 Nov 2015 11:06:45 +0100 Message-Id: <1447063614-4662-7-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1447063614-4662-1-git-send-email-daniel.lezcano@linaro.org> References: <1447063614-4662-1-git-send-email-daniel.lezcano@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The value returned in case of error for the 'irq_of_parse_and_map' function is zero in case of error. Fix the check in the init code. Signed-off-by: Daniel Lezcano --- drivers/clocksource/h8300_timer8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ diff --git a/drivers/clocksource/h8300_timer8.c b/drivers/clocksource/h8300_timer8.c index 2433325..3eedeff 100644 --- a/drivers/clocksource/h8300_timer8.c +++ b/drivers/clocksource/h8300_timer8.c @@ -230,7 +230,7 @@ static void __init h8300_8timer_init(struct device_node *node) } irq = irq_of_parse_and_map(node, 0); - if (irq < 0) { + if (!irq) { pr_err("failed to get irq for clockevent\n"); goto unmap_reg; }