From patchwork Sun Nov 8 22:36:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 56172 Delivered-To: patch@linaro.org Received: by 10.112.1.169 with SMTP id 9csp162188lbn; Sun, 8 Nov 2015 14:38:40 -0800 (PST) X-Received: by 10.66.150.37 with SMTP id uf5mr35037940pab.30.1447022315322; Sun, 08 Nov 2015 14:38:35 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id lo9si17916714pab.201.2015.11.08.14.38.34; Sun, 08 Nov 2015 14:38: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 S1752154AbbKHWi2 (ORCPT + 28 others); Sun, 8 Nov 2015 17:38:28 -0500 Received: from mail-wi0-f174.google.com ([209.85.212.174]:35321 "EHLO mail-wi0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751686AbbKHWhg (ORCPT ); Sun, 8 Nov 2015 17:37:36 -0500 Received: by wiby19 with SMTP id y19so5659625wib.0 for ; Sun, 08 Nov 2015 14:37:35 -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=YijuUH8aBTcsLQiGbrrJMWL9c4vhbJnWr5Hf3V9SejM=; b=v1y8dPG2PmD2xH11Xn7L35G8ohSsVyWOpcbE3q94t0ov8NGygQJ7DFVxzWYyYmZLo5 R2WO/PW7mLkXWkTUgnjx/qFr3tYI42XUxO3EMIK4/1Gpp2MCetpgVup7eh+EoJ4QoEmp TrVDL4594l3hqUFTD3PbrAkKL5FjqPxpJD8y+ckKjS4sgqIPYEXOWWxcuPQmb+dAb/nz 71hv+Gt32ubZy21r+HE0oG63ePrqQe3GkkPvI896J0nE5LK/9mg416DxS2cUE72Rwvdv yy1tlnOWbbSxKfeuTycKVxVnbq8CvQHvmAP45Yr1R5QVexPrXffZSr4uIOF9P6QVrMB+ eafg== 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=YijuUH8aBTcsLQiGbrrJMWL9c4vhbJnWr5Hf3V9SejM=; b=J2UqhTL86bMYhOokbxrdJEEaW4wiJsSbS3tHCImoD/RTiBTahhP3WWIjdyyfypH0Sk pGBUvkWcGquSZtCj+aMaceiSFHNChRmg0ZQmL2ShGTyDIR3AFDq0xDn+BpT/PtEqTakq MlVGrkRUuuSBsBXzgDnIy/r6z2ogywDmDjKrrnqYhCPGvID2gM5l7I61P57dJVe9fupc XKYe2tk/cKzBseQKTviNlPhh4cxKsGkb5IL6N5jVuAL9YrIbnwtFGY3WfMYT4Z5APqi2 NB6B/SbwtwqeTaZVexEbvJ5VuWeKUAZS5Y0LCZY4vOTsEUZo+0Ho0p6NIh0BiiDxKbrI nFlA== X-Gm-Message-State: ALoCoQkQoup3+ltU3pFDtmwK8w05SP5bSIydq+fPK6wrtWH/2Xw1uNE9jmm494gKjCm+5PnjGSnR X-Received: by 10.194.118.40 with SMTP id kj8mr30258860wjb.121.1447022255095; Sun, 08 Nov 2015 14:37:35 -0800 (PST) Received: from localhost.localdomain ([78.210.255.2]) by smtp.gmail.com with ESMTPSA id n17sm10912746wmg.17.2015.11.08.14.37.33 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 08 Nov 2015 14:37:34 -0800 (PST) From: Daniel Lezcano To: daniel.lezcano@linaro.org, ysato@users.sourceforge.jp Cc: tglx@linutronix.de, linux-kernel@vger.kernel.org, uclinux-h8-devel@lists.sourceforge.jp (moderated list:H8/300 ARCHITECTURE) Subject: [RFC PATCH 06/10] clocksource/drivers/h8300_timer8: Fix irq return value check Date: Sun, 8 Nov 2015 23:36:35 +0100 Message-Id: <1447022199-4648-6-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1447022199-4648-1-git-send-email-daniel.lezcano@linaro.org> References: <1447022199-4648-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 f66cd6f..680f65b 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; }