From patchwork Fri Dec 18 14:17:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 58685 Delivered-To: patch@linaro.org Received: by 10.112.89.199 with SMTP id bq7csp1056314lbb; Fri, 18 Dec 2015 06:19:47 -0800 (PST) X-Received: by 10.66.229.2 with SMTP id sm2mr5633584pac.28.1450448386972; Fri, 18 Dec 2015 06:19:46 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o65si19201858pfa.179.2015.12.18.06.19.46; Fri, 18 Dec 2015 06:19:46 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933169AbbLROTh (ORCPT + 29 others); Fri, 18 Dec 2015 09:19:37 -0500 Received: from mail-wm0-f42.google.com ([74.125.82.42]:37294 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964818AbbLROT0 (ORCPT ); Fri, 18 Dec 2015 09:19:26 -0500 Received: by mail-wm0-f42.google.com with SMTP id p187so66502089wmp.0 for ; Fri, 18 Dec 2015 06:19:26 -0800 (PST) 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=Di+fPY7RPQyjiko3Q+hfsoqJXZevZlbkKcZa7dc5zxw=; b=Duue3yvRsDpUZhRPrL0c9moXB047xRP33E8IiRtKM2jgMI/ZDgy/u3EXuxBc/3/W0R MD4QK/Yhqov7jtZW2mKP3/bkCO+cNezA/J7A/jnKwFQYWm9Qc09qs611BFMcHJjWXlWk s/1WFUoZN7O5XJR7Z8WtXI4YvTnsI8x6ggpwU= 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=auY6NYcRdmCRf1ugw30uEovyIxBk3JjdjVi+2SuUMcBuB+beF/FVfLiFPE+TkXgL+Q W8dT/JRfg7HcmBQR2/dPXPPk/HZvJ4e5LgCB+PAQD23RjpE6ACVut6OOo+rwrk6WCPKZ 6sRA+TolWOGF3q4GEiAdRIFgdMxB7l+w0uDKDEkyY4XNIDMWrFQiB0ceOxtAF9ts3tcV ruc1zl7IUwJqonKxZJJNQ7lCFbZmPwXo0xtRFEZpHMOl4dUECQHsd+zLfrneJIPWAE0w UFkpjxPeSwXbqJZrUQFczfnPeq5F2puCXyvOedxOKmY4vT9oAKMSSBreyHUXsl6WitEx SxWg== X-Gm-Message-State: ALoCoQlq5Q8KnWiOpJdVg8NV+MjN173vTixbs2C4h38bsTBpQnj6R1X46wnk2GStA59Y6kTXspahiNfxtz5vg7G/feltEN9X5Q== X-Received: by 10.194.120.226 with SMTP id lf2mr4362826wjb.108.1450448365614; Fri, 18 Dec 2015 06:19:25 -0800 (PST) Received: from localhost.localdomain ([78.210.255.2]) by smtp.gmail.com with ESMTPSA id ql10sm15010027wjc.23.2015.12.18.06.19.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 18 Dec 2015 06:19:25 -0800 (PST) From: Daniel Lezcano To: tglx@linutronix.de Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, mingo@kernel.org, Yoshinori Sato , uclinux-h8-devel@lists.sourceforge.jp (moderated list:H8/300 ARCHITECTURE) Subject: [PATCH 44/69] clocksource/drivers/h8300_timer8: Fix irq return value check Date: Fri, 18 Dec 2015 15:17:57 +0100 Message-Id: <1450448302-27429-44-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1450448302-27429-1-git-send-email-daniel.lezcano@linaro.org> References: <5672CB9E.7090707@linaro.org> <1450448302-27429-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; }