From patchwork Sun Aug 6 13:38:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 9883785 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A576D603F2 for ; Sun, 6 Aug 2017 13:46:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 94EA5285A7 for ; Sun, 6 Aug 2017 13:46:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8954B285B1; Sun, 6 Aug 2017 13:46:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EA960285A1 for ; Sun, 6 Aug 2017 13:46:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751256AbdHFNpq (ORCPT ); Sun, 6 Aug 2017 09:45:46 -0400 Received: from mail-lf0-f41.google.com ([209.85.215.41]:35056 "EHLO mail-lf0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751343AbdHFNpo (ORCPT ); Sun, 6 Aug 2017 09:45:44 -0400 Received: by mail-lf0-f41.google.com with SMTP id t128so21491714lff.2 for ; Sun, 06 Aug 2017 06:45:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cogentembedded-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:user-agent:date:to:cc:subject:mime-version :content-disposition; bh=VoJRQi0oZ6DtS08++MkzTz6cizRBKvFXJ5ZjSGPJfN0=; b=nwQOgx34XEogCjHu+hsNgPzbwgZ2D46OkiaA+GN/yY/eGvQ3k4Rr5bKaTvuM6Kn2Dg aPyr9y/Gah03WDqAbNQ6LT25NOBhL47V5Qdnb/kskLz/WDYJUeXlJwzvwdheZ0t4qq7b WIaJ6kVaF8M6lvC0r8gtX2ErBC7uiAZY8Pp9Yp56b6d0I7ay8ghhy6aWlCMGGK7E76R3 HYtCKnXG6fjZgGLP5n7UlHtzjwit+Mw7659WCKVrUattxzPcTDWNQHvcgz4owUOg+T4g P32dZwHODkxXzjX0c9McyEtBOpP/lNSsHzM3ZKGsUOb0SM1z9bd7FmgFCCtkn0LkT9ka A1Qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:user-agent:date:to:cc:subject :mime-version:content-disposition; bh=VoJRQi0oZ6DtS08++MkzTz6cizRBKvFXJ5ZjSGPJfN0=; b=AG+ksev5beEZSM3iFozGaVQnIsKm06FSJTmyYPKif+hPb1wv5jTL/jhGlnCy2Pd+Ea 7gEiF8G87HkOF6xeL32Elub4lzAvmwY20Iwi+EKk/Km3bVotlrw3bunuDlEJmGNDCDNO 6Evg5BzAzPkT3u56FXMeiiYn1CCoYofM0I1dkGjeYRUKr4AxuzKT8lPsIWgobzYvr24u jS31MRymLlspsqwtbBoYSZE+1Oosv6H4caEY/SCxwjxlEPqOgW0vd2D6SU9PElbPxBZv cygKmzi57sl0gx6iiaRAZ9od7vEgAYi0cG++i6jfixtx7193GD1OY4oSuZbNXUXBBz2X KK2Q== X-Gm-Message-State: AHYfb5jc7nNsJiR3u4qRZWHnyyJ4HLfRzpqIiS9HLxmbw2HJ72WU53JI veMjnqyS/b7Ko02UdGo7sQ== X-Received: by 10.25.205.84 with SMTP id d81mr3207731lfg.255.1502027142891; Sun, 06 Aug 2017 06:45:42 -0700 (PDT) Received: from wasted.cogentembedded.com ([31.173.85.122]) by smtp.gmail.com with ESMTPSA id e7sm2452771ljb.84.2017.08.06.06.45.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Aug 2017 06:45:41 -0700 (PDT) From: Sergei Shtylyov X-Google-Original-From: "Sergei Shtylyov" Received: by wasted.cogentembedded.com (sSMTP sendmail emulation); Sun, 06 Aug 2017 16:45:39 +0300 Message-Id: <20170806134539.404484506@cogentembedded.com> User-Agent: quilt/0.64 Date: Sun, 06 Aug 2017 16:38:50 +0300 To: Rajendra Nayak , Paul Walmsley , Tony Lindgren , linux-omap@vger.kernel.org Cc: Russell King , linux-arm-kernel@lists.infradead.org, Sergei Shtylyov Subject: [PATCH 1/2] ARM: OMAP3: PRM: fix of_irq_get() result check MIME-Version: 1.0 Content-Disposition: inline; filename=ARM-OMAP3-PRM-fix-of_irq_get-result-check.patch Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP of_irq_get() may return 0 as well as a nagative error number on failure (and never on success), however omap3xxx_prm_late_init() regards 0 as a valid IRQ -- fix this. Fixes: 1e037794f7f ("ARM: OMAP3+: PRM: register interrupt information from DT") Signed-off-by: Sergei Shtylyov --- arch/arm/mach-omap2/prm3xxx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux-omap/arch/arm/mach-omap2/prm3xxx.c =================================================================== --- linux-omap.orig/arch/arm/mach-omap2/prm3xxx.c +++ linux-omap/arch/arm/mach-omap2/prm3xxx.c @@ -706,7 +706,7 @@ static int omap3xxx_prm_late_init(void) np = of_find_matching_node(NULL, omap3_prm_dt_match_table); if (np) { irq_num = of_irq_get(np, 0); - if (irq_num >= 0) + if (irq_num > 0) omap3_prcm_irq_setup.irq = irq_num; } }