From patchwork Sun Aug 6 15:14:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 9883807 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 43DA9603F9 for ; Sun, 6 Aug 2017 15:17:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 322A5285E5 for ; Sun, 6 Aug 2017 15:17:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 26F60285E6; Sun, 6 Aug 2017 15:17:37 +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 19823285E8 for ; Sun, 6 Aug 2017 15:17:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751342AbdHFPRT (ORCPT ); Sun, 6 Aug 2017 11:17:19 -0400 Received: from mail-lf0-f46.google.com ([209.85.215.46]:34943 "EHLO mail-lf0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751300AbdHFPRT (ORCPT ); Sun, 6 Aug 2017 11:17:19 -0400 Received: by mail-lf0-f46.google.com with SMTP id t128so21897097lff.2 for ; Sun, 06 Aug 2017 08:17:18 -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=wgR+1CJ5B8ywhmaVrfg5ee+p0pk9m02vX93IZKt4UUY=; b=hBsQx0b1Jt1rDZLVCKgDw1uAIPZh9TQAjoj6pt0Cy1EDR305KqI9F5EPIS8QkvCV2H dYj4M5nDSnqhp7eJVFH7ONAjMiwurDo1LyITTpcGJorVZI7Y8goVk00M/YkXfaxKPFvy ACDa1F9ko16dvBVJyqJu+cCq+h0PptkZVrFqFb9jgmdkhxNw72P6L2n1psu1vX6f3nzR g7NZPLafT1Jn3hVSmf2WheM01KSHR8OMMdLYKHU84vw68iNJH8kibJy0S2azMhIMjL2Z aVVqJic/BTVDndM3vcsPYvitmBjmCqSA6vhagjSE5/miIeGRSIn+cMKKB2pESEPDTV6H LslQ== 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=wgR+1CJ5B8ywhmaVrfg5ee+p0pk9m02vX93IZKt4UUY=; b=I17x9E7NTIqgTX3W3qMeEfSsAoLs6k7J+PeIjlEKa9PwDQriNIZlkg57wisb01/AZi /zTeMRnRdCCZ5os0puyFCBX+F3gis3K86+tBzu9SMRvUzq/8kcw0QktZvnosAIJ8Z0gD UEu85exMWJvfTcRgSOz6oy/KoKQ/P3TkiuIIPcPmlbGGC+atwTZPEGvCVhAwH1jQQfBm SFkUVMixnArqPTayvnDCk8ctvbfHuqHP9nhPnjbFduRF3ivdonJbHAfc8cnzNwYw8T+K /vCZAaY0eORy8Ilo5Uk2wMjsX3yc74kijbGAtsAusEEpC4ByzbepEhX9iFlUEQrLE5fw C+Yw== X-Gm-Message-State: AHYfb5i4EAUdx8tOxUmSSWEj0iwMMDwc2RqqjblxEwj7dtxzNVyKaK0A BKeFr2FS7wTimQxtRRuAFQ== X-Received: by 10.25.125.5 with SMTP id y5mr2201518lfc.135.1502032637969; Sun, 06 Aug 2017 08:17:17 -0700 (PDT) Received: from wasted.cogentembedded.com ([31.173.85.122]) by smtp.gmail.com with ESMTPSA id n103sm1851126lfi.57.2017.08.06.08.17.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Aug 2017 08:17:16 -0700 (PDT) From: Sergei Shtylyov X-Google-Original-From: "Sergei Shtylyov" Received: by wasted.cogentembedded.com (sSMTP sendmail emulation); Sun, 06 Aug 2017 18:17:14 +0300 Message-Id: <20170806151714.108596802@cogentembedded.com> User-Agent: quilt/0.64 Date: Sun, 06 Aug 2017 18:14:22 +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 v2 2/2] ARM: OMAP4+: PRM: fix of_irq_get() result checks MIME-Version: 1.0 Content-Disposition: inline; filename=ARM-OMAP4-PRM-fix-of_irq_get-result-checks-v2.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 omap44xx_prm_late_init() regards 0 as a valid IRQ -- fix this. Fixes: a8f83aefcd5a ("ARM: OMAP4+: PRM: register interrupt information from DT") Fixes: c5b3955828ba ("ARM: OMAP4: Fix legacy code clean-up regression") Signed-off-by: Sergei Shtylyov --- Changes ion version 2: - added the "Fixes:" tag for the commit introducing of_irq_get() call; - rebased to the 'omap-for-v4.13/fixes' branch; - fixed Rajendra Nayak's email; - added + to OMAP4 in the patch subject. arch/arm/mach-omap2/prm44xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 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/prm44xx.c =================================================================== --- linux-omap.orig/arch/arm/mach-omap2/prm44xx.c +++ linux-omap/arch/arm/mach-omap2/prm44xx.c @@ -747,7 +747,7 @@ static int omap44xx_prm_late_init(void) * Already have OMAP4 IRQ num. For all other platforms, we need * IRQ numbers from DT */ - if (irq_num < 0 && !(prm_init_data->flags & PRM_IRQ_DEFAULT)) { + if (irq_num <= 0 && !(prm_init_data->flags & PRM_IRQ_DEFAULT)) { if (irq_num == -EPROBE_DEFER) return irq_num; @@ -756,7 +756,7 @@ static int omap44xx_prm_late_init(void) } /* Once OMAP4 DT is filled as well */ - if (irq_num >= 0) { + if (irq_num > 0) { omap4_prcm_irq_setup.irq = irq_num; omap4_prcm_irq_setup.xlate_irq = NULL; }