From patchwork Fri Dec 18 14:18:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 58701 Delivered-To: patch@linaro.org Received: by 10.112.89.199 with SMTP id bq7csp1060763lbb; Fri, 18 Dec 2015 06:27:22 -0800 (PST) X-Received: by 10.66.66.1 with SMTP id b1mr5612218pat.27.1450448842168; Fri, 18 Dec 2015 06:27:22 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id zk7si24306793pac.228.2015.12.18.06.27.21; Fri, 18 Dec 2015 06:27:22 -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 S933230AbbLRO1P (ORCPT + 29 others); Fri, 18 Dec 2015 09:27:15 -0500 Received: from mail-wm0-f47.google.com ([74.125.82.47]:36710 "EHLO mail-wm0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932502AbbLROTf (ORCPT ); Fri, 18 Dec 2015 09:19:35 -0500 Received: by mail-wm0-f47.google.com with SMTP id p187so65520351wmp.1 for ; Fri, 18 Dec 2015 06:19:35 -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=635NVv24rbhNf/UR6UVzM1dhIIgIYXz92QuMelk6BPM=; b=ffvQaSdrXrwpEU0mZ8jvhNx9qeSz3ZoSTuIW8SdOFGqx/elCj8jx70zTBPI123SYRa eJ5rqUiB1C6MvjIY15q/NrVZYfsPW5GTbzmus2NKokhQvFrZCw1o3LvpxWkZYWd7KH2q x1MCMnaFbQIvSNJi0f1qI5MFSW1g19V0GvN5I= 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=635NVv24rbhNf/UR6UVzM1dhIIgIYXz92QuMelk6BPM=; b=JiGsQ5DYE0Hd646zZRpdFswGZ8ffKDnKf69gTqKB5eLhMrvR3xMjKSX7Ck89g3X3F7 5gx9EZs/5dzmwW3AjKgOEjoYywsUpJSpHAhkEAcWIVOep0scr31QCkHTWJZFrf0PzlIn VBsYcysdKC0VHQsBSaKmlVjjsHgq0XTRuYmjC61uHH0y11zL9uirrVRdFBDNbNf0PVn/ 95yfb9CU1TZ6VwubtnMPKD7aBI5PZBtlrQTMFVogqm1sDP9Y0/1HlvqGv8o+arPj2vnT APWYjZaYi8uL2Xm7xuGXSWkCjFYptZplCkF8C5+2H4lReko4ClEbPxaTpb6F8pqGwxw7 95gQ== X-Gm-Message-State: ALoCoQkVJjMuX5/dFOrNAEBphlL1i5yBZ0O3lxS0tEbb/CNgXESx6bmjPXOzdCbxbPDkaSIW8BX7ws9Q7EONnm09OyQG0Qko+Q== X-Received: by 10.194.120.226 with SMTP id lf2mr4363598wjb.108.1450448374436; Fri, 18 Dec 2015 06:19:34 -0800 (PST) Received: from localhost.localdomain ([78.210.255.2]) by smtp.gmail.com with ESMTPSA id ql10sm15010027wjc.23.2015.12.18.06.19.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 18 Dec 2015 06:19:33 -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 51/69] clocksource/drivers/h8300_timer16: Fix irq return value check Date: Fri, 18 Dec 2015 15:18:04 +0100 Message-Id: <1450448302-27429-51-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 function irq_of_parse_and_map returns zero in case of failure. Fix the return code test to check against zero. Signed-off-by: Daniel Lezcano --- drivers/clocksource/h8300_timer16.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_timer16.c b/drivers/clocksource/h8300_timer16.c index 6705bf7..129dca0 100644 --- a/drivers/clocksource/h8300_timer16.c +++ b/drivers/clocksource/h8300_timer16.c @@ -155,7 +155,7 @@ static void __init h8300_16timer_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_comm; }