From patchwork Mon Nov 9 10:06:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 56201 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp90847lbb; Mon, 9 Nov 2015 02:07:53 -0800 (PST) X-Received: by 10.68.135.73 with SMTP id pq9mr38713116pbb.53.1447063672321; Mon, 09 Nov 2015 02:07:52 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z2si21507001pbw.3.2015.11.09.02.07.51; Mon, 09 Nov 2015 02:07:52 -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 S1752998AbbKIKHk (ORCPT + 28 others); Mon, 9 Nov 2015 05:07:40 -0500 Received: from mail-wi0-f178.google.com ([209.85.212.178]:38271 "EHLO mail-wi0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752866AbbKIKHb (ORCPT ); Mon, 9 Nov 2015 05:07:31 -0500 Received: by wicli17 with SMTP id li17so12071228wic.1 for ; Mon, 09 Nov 2015 02:07:29 -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=635NVv24rbhNf/UR6UVzM1dhIIgIYXz92QuMelk6BPM=; b=nH+n6t8E0/ngkBydreNM7q/fbxmcbtFG5FSWmvEvv1+//hSvcgQaRP4GyZf98K6vsY ip1OGSZHW6zpr5tciuomtNCs2fWxI9+hXZ58npNLiZ8Zg1w+XOsSvTZhLxeXF1HzbmPW kqR++1Fxekl5P/AgGOoNohaWfzPRB/IZtJb98XOlW9zZgPWVXIuD6jYZofa4pZIFdvyz JPSCp+8mguz4u3wLOhDIXb2GqufY/vpfMwrRzPWnm9DbA5IOlC6wWlkq2FnvS2w1wDD3 s8/mNr8S4CxsVSGyJZERNVzRzuVAknKTyFlo3Ed3lIJhQn+wexsZOdWkP6fCuRTxo8xo ODjA== 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=hqgRqsV0l4uyzjuXLVH/bGcEmfKlRye5eTB1qAp6JmAf//n8wv5jrWeYeu217KutCQ 4ByktRfygXcwsSE4ov1TjMg64EWhlFKNnajUuPZmfBdRHTJSJ3rPy3x2joWt1AMFTSuq gpkAZNFmiekWO9G6VFO/tDM9hUaNWLpI15K2XKMWG6pNSaylaBNEmYPF69fzQ3x4zmk/ iTz8mmuJCCsVXIHpcYCdMLI1stqo9P+onI9NKU8suj0oWhpgLxQX+B7LpX9BzUbLNNKN bC+GXEOZ7yinU8Tc9aXmnW7tEA3RFtnNHAROGDVTfdJxGoU5PA7YjYUoIhFpQyVV3fa8 2rWA== X-Gm-Message-State: ALoCoQmF/TNxmGZmaDaU9KIJz8dik6SKzQ5V9y3C7ZO8oDGXvES2Q036tY78ktivir/62BEHeM7l X-Received: by 10.194.143.115 with SMTP id sd19mr28865450wjb.94.1447063649720; Mon, 09 Nov 2015 02:07:29 -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.28 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 09 Nov 2015 02:07:29 -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 14/15] clocksource/drivers/h8300_timer16: Fix irq return value check Date: Mon, 9 Nov 2015 11:06:52 +0100 Message-Id: <1447063614-4662-14-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 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; }