From patchwork Sun Aug 6 13:38:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 9883787 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 015D160360 for ; Sun, 6 Aug 2017 13:46:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E75782854A for ; Sun, 6 Aug 2017 13:46:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DBF9E2856A; Sun, 6 Aug 2017 13:46:33 +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 16B9E285A6 for ; Sun, 6 Aug 2017 13:46:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751343AbdHFNpt (ORCPT ); Sun, 6 Aug 2017 09:45:49 -0400 Received: from mail-lf0-f43.google.com ([209.85.215.43]:36369 "EHLO mail-lf0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751277AbdHFNps (ORCPT ); Sun, 6 Aug 2017 09:45:48 -0400 Received: by mail-lf0-f43.google.com with SMTP id o85so21419388lff.3 for ; Sun, 06 Aug 2017 06:45:47 -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=3l0bDMCDuz0uPBTh643hFPGpKE9nFwgspCdguOyNjL4=; b=IuI8C9qKNGDf2yvHITMsxLv31xvaNCpA1YLhhIUL8Zx4c3+JSab7ayMKqD0VhY3irr gwGEm2OMb7bmuLptPcj4OnCxW6RkyyepQCo1+oru5YmG/PbONJpCL66IgwIh5Oipom+P b7il9HAUSgNHCO2gdVhUCjjHWKlcdVj/43Dbz89Q72SN3kyfxvHLAL64XGL6jJm5JyHy VDGhNz4hdmlM1rwXKqVHx8TZMY+Q47EpJr+juDLrOEGdMP0Nqw/+IuLoFYJV2Uv2I4Sc bjbARyb2h6Y1JH0VDhPHH5Le5wvkzIMn+iMNj33O7EEo/rSM/L5ChPEt3b/4IU6xKZ1t WmTQ== 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=3l0bDMCDuz0uPBTh643hFPGpKE9nFwgspCdguOyNjL4=; b=E6GFNrE7POm2TS70KpQZsTtlx/Lh56VfiWQe5fK9YIK/9RTI1ePfOdMGB99DMzbMnh oBwdFih/4oiv6RNV6PHkNO+JbOb7NOCL0WcwoBsvwSKI68wuhU4cgyQkonpdA04BoY8I OtWRhTWQ3tx+TfngJDScOI+U4mUAyDXNF+yaD46kEHw7FKGGWLUYnRaul6CWzWC5w6cu ieJv98Tww+K+1aNrEGTqMI47kINy5ISWos+REsA/wSTBLtZzY81NA3u/8SKmEPb675P6 LBtTBhl4I14l8wKTGu1uUBUtyZ6lg5dtne4/h38xJp0vbvHg+hUGfh++OqTvP1U4rCJU Iu0Q== X-Gm-Message-State: AHYfb5hCOo8lI8tlZRAzYVlqb8wTEFaquphmj5aKDlEyc0W+hkvkW+rX Ob2EKZUMON6aGwHsSB5ktg== X-Received: by 10.46.20.16 with SMTP id u16mr2812090ljd.54.1502027146819; Sun, 06 Aug 2017 06:45:46 -0700 (PDT) Received: from wasted.cogentembedded.com ([31.173.85.122]) by smtp.gmail.com with ESMTPSA id z1sm243073lja.21.2017.08.06.06.45.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Aug 2017 06:45:45 -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:43 +0300 Message-Id: <20170806134543.511156423@cogentembedded.com> User-Agent: quilt/0.64 Date: Sun, 06 Aug 2017 16:38:51 +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 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.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: c5b3955828ba ("ARM: OMAP4: Fix legacy code clean-up regression") Signed-off-by: Sergei Shtylyov --- 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 @@ -751,7 +751,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; @@ -760,7 +760,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; }