From patchwork Wed Mar 11 19:19:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aman Sharma X-Patchwork-Id: 11432651 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5B5DB1392 for ; Wed, 11 Mar 2020 19:19:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CC89A20749 for ; Wed, 11 Mar 2020 19:19:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="G2+txh85" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730962AbgCKTTV (ORCPT ); Wed, 11 Mar 2020 15:19:21 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:38851 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730807AbgCKTTU (ORCPT ); Wed, 11 Mar 2020 15:19:20 -0400 Received: by mail-pg1-f194.google.com with SMTP id x7so1718084pgh.5; Wed, 11 Mar 2020 12:19:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=r42oaftrh5pHz14qU1GYkB0RQE5bj151KUZhP6WCLUU=; b=G2+txh85XP+S2jm9NSogjxqBUikS9Ngp6DtlfWcrAd9ufiH47Xb0eN1WLqYPThF/21 1CiU/fLxTDxovvO+tstyelBWaQNE54Cd9MaVw5sUNbbJll0t9oy6RoVBciTb1yx+p3n8 SYMIbkSRuqEWGJPp9+ILBaLuPRjrhgatYgkP4uCMx2DpqGuBtdGqDm9bz7yvAOkct02H ymKsFcr0TFGylW3wkp6TPDnM7XYWoZVV1aaNU6yHrcziFZvZIJAKRJCwXzanVr0JxFdT eOoxecolqmumlXalOmw6vTiAKijvk0SgCuOyhL3gDgTTbUUoHdPR+r5SudaD3n/8pHnx JSmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=r42oaftrh5pHz14qU1GYkB0RQE5bj151KUZhP6WCLUU=; b=UFqMRfRVbZSurBAXuDM99VAZHjYk6UKia3S/an2cQjvV1YfIs+jdWcPlDLijRPlJbG /SSzbA7icVFURqm8BC7q6tvQb3SVD1gJZ0GOXVWt8KdpUKUUYd4A8v2tpdzT8EzWvVbS JXTAvFVZaqfZLEOOQv/cshIpf79ry/1UMV96sLCw1hazwpeugFjx9ysx4CveS8GWb2Eb xHHn+YvjRlnyYNo8DuIWo+zBCXtG9eRk+tGoEcm6lHOX6izo7lGl6Nzx1+Txgvy8QEF0 0+9G2C6dH6vf2AXjJMKAwa1Fda/NjHYlFjcDsCynuFjAAD5yk4LaTRssj63CGNSBlHeM 4rDA== X-Gm-Message-State: ANhLgQ1F78/TcJ0fN3gHSRlC7WXjMdihGxl5pHXnrcTEqh8UBuoP3N8R elHH20ePgWDeF4O3sScz8oo+qURm/qr3pg== X-Google-Smtp-Source: ADFU+vtbPme6BTAJZmyevs7rgWm3h1iPQrP+b1siICnoXHB1UQz+utoRSjjlAt3zopkF2PlmJnFY3w== X-Received: by 2002:a62:ce48:: with SMTP id y69mr4249326pfg.178.1583954359553; Wed, 11 Mar 2020 12:19:19 -0700 (PDT) Received: from localhost.localdomain ([103.46.201.94]) by smtp.gmail.com with ESMTPSA id z17sm3792673pff.12.2020.03.11.12.19.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Mar 2020 12:19:19 -0700 (PDT) From: Aman Sharma Cc: amanharitsh123@gmail.com, Thomas Petazzoni , Lorenzo Pieralisi , Andrew Murray , Bjorn Helgaas , Linus Walleij , Ryder Lee , Karthikeyan Mitran , Hou Zhiqiang , Marc Gonzalez , Mans Rullgard , Matthias Brugger , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [PATCH 1/5] pci: handled return value of platform_get_irq correctly Date: Thu, 12 Mar 2020 00:49:02 +0530 Message-Id: X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Signed-off-by: Aman Sharma --- drivers/pci/controller/pci-v3-semi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/controller/pci-v3-semi.c b/drivers/pci/controller/pci-v3-semi.c index bd05221f5a22..a5bf945d2eda 100644 --- a/drivers/pci/controller/pci-v3-semi.c +++ b/drivers/pci/controller/pci-v3-semi.c @@ -777,9 +777,9 @@ static int v3_pci_probe(struct platform_device *pdev) /* Get and request error IRQ resource */ irq = platform_get_irq(pdev, 0); - if (irq <= 0) { + if (irq < 0) { dev_err(dev, "unable to obtain PCIv3 error IRQ\n"); - return -ENODEV; + return irq; } ret = devm_request_irq(dev, irq, v3_irq, 0, "PCIv3 error", v3); From patchwork Wed Mar 11 19:19:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aman Sharma X-Patchwork-Id: 11432655 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BD3B192A for ; Wed, 11 Mar 2020 19:19:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3B2CC20746 for ; Wed, 11 Mar 2020 19:19:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BfRQMt0i" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731108AbgCKTT0 (ORCPT ); Wed, 11 Mar 2020 15:19:26 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:41716 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730807AbgCKTT0 (ORCPT ); Wed, 11 Mar 2020 15:19:26 -0400 Received: by mail-pl1-f196.google.com with SMTP id t14so1533562plr.8; Wed, 11 Mar 2020 12:19:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iN1lIy0/f67JfCi9KU7uh6n3lgkv7oAoZ5NZ3robPh0=; b=BfRQMt0ipgIFCsbepxc9l/xVpH3h5JT7quohnIEoWdro74//CquJsdriyla9b7QShh xdhsTWb+9hwl8ivWbbOHSq1aRRafUqRVsmh1R6Y0L5NZuukW/PvO/p81LYdadlpHmfPr 3fnhkVIi6b5tCbqP534B/yAnACgpkdWA8GZpXzMMerkdn+wN1Cio3sYXjP3FwGj0mp9K SfnpSzxn4zW1Mk5XGUvc3b+PWSrQOU2Ct2eQnaifytiDdyzu1F5MMTpbTMthiWYkF9ZR hwXA0ViLm+Uw4fIAWd2KBIPc6SiX0DWe2CFpr9qpPwvViXhLGUlw3ZRRnXKWakd2PtCl rzJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iN1lIy0/f67JfCi9KU7uh6n3lgkv7oAoZ5NZ3robPh0=; b=aVucX9oydasVrbpxKSSYCIJ9RmJ2910a0umlmKfvvvA0NERJTRvGHd3SDdTFMb7l3Z ltf2jE/NNDJOObTm9O3YH7hudfwh0VJlkV2UmJ/2TRvqpeN+QE16zTDuH5NwxrFZYhz2 5ly2776cSrS3VR0FEf31I7f/AUPGsL3vATiNoqDsUFFLJMapu6IY3kA4PjlQhoHEIAMB jvHKSOY86Axucv8+mgu0soYnu3kMrmH3A1h2MD/JZGKCTbh6W9q2iWSGvHa7bCi84j4g e8iRdqK+4kKJsS6RfbvdDR0h0BzaG+CQ0bV55/Gi/A7JlKlVGEehN6A18TV0o8ieG2mS hoAQ== X-Gm-Message-State: ANhLgQ1oxVBbV4ajhmfqB8DwThG9wPqLSEZItToC2suNQJfBH8bd+UOG H/BY5bY6EBJpnfIpxBLxEaQ= X-Google-Smtp-Source: ADFU+vut3MyakqoUhMIetlzMKR/p4VXgaNSrjQMPOpcFkSKePWWm++E+Uy2ID9u1cYMxZFT24UeMyQ== X-Received: by 2002:a17:90a:d593:: with SMTP id v19mr200036pju.177.1583954365043; Wed, 11 Mar 2020 12:19:25 -0700 (PDT) Received: from localhost.localdomain ([103.46.201.94]) by smtp.gmail.com with ESMTPSA id z17sm3792673pff.12.2020.03.11.12.19.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Mar 2020 12:19:24 -0700 (PDT) From: Aman Sharma Cc: amanharitsh123@gmail.com, Thomas Petazzoni , Lorenzo Pieralisi , Andrew Murray , Bjorn Helgaas , Linus Walleij , Ryder Lee , Karthikeyan Mitran , Hou Zhiqiang , Marc Gonzalez , Mans Rullgard , Matthias Brugger , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [PATCH 2/5] pci: added check for return value of platform_get_irq Date: Thu, 12 Mar 2020 00:49:03 +0530 Message-Id: <53b57606d7bc2615a43b1d5159200dba0435af6d.1583952276.git.amanharitsh123@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Signed-off-by: Aman Sharma --- drivers/pci/controller/pci-aardvark.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pci/controller/pci-aardvark.c b/drivers/pci/controller/pci-aardvark.c index 2a20b649f40c..40a4257f0df1 100644 --- a/drivers/pci/controller/pci-aardvark.c +++ b/drivers/pci/controller/pci-aardvark.c @@ -973,6 +973,9 @@ static int advk_pcie_probe(struct platform_device *pdev) return PTR_ERR(pcie->base); irq = platform_get_irq(pdev, 0); + if (irq < 0) + return irq; + ret = devm_request_irq(dev, irq, advk_pcie_irq_handler, IRQF_SHARED | IRQF_NO_THREAD, "advk-pcie", pcie); From patchwork Wed Mar 11 19:19:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aman Sharma X-Patchwork-Id: 11432659 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0A68192A for ; Wed, 11 Mar 2020 19:19:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7C78820746 for ; Wed, 11 Mar 2020 19:19:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="avwLSbYP" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731123AbgCKTTb (ORCPT ); Wed, 11 Mar 2020 15:19:31 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:46452 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730807AbgCKTTb (ORCPT ); Wed, 11 Mar 2020 15:19:31 -0400 Received: by mail-pl1-f193.google.com with SMTP id w12so1524186pll.13; Wed, 11 Mar 2020 12:19:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=02Tw1k2Q38WueLNikGUX0EcXKDMIWen5M9i6gPM5Zj4=; b=avwLSbYPrJFeGMWyeeJPgpyMc6eZIgulQvJJACFk8LWJ7HzV7HO8ikUbQSac0O2Soj /RjNmGzqh3cSgVBNRF8SWz0kd1JNjiwKtfzfdTlHW6eG09Sf04ZE2X2+P2mBinSoSbEd ZtbV8rrBa9wwNAw6uF+WKE5ZC5z+jqKmGAHILwskaowFvMVSkx5YuY+cGwn7VknnDL2a JWrihz0fTOXoLdKzTc7yZvZ4/gbWPExseEhqgLuMa3bmlmkHOEe42v5iSpOwJoWoVo1k CEbqUOOP4ESOlvpND9fptc3xDLYda6kFYg0dH4XM6NlQYMk5E8nYUFstmTKAQg84fTr4 BRhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=02Tw1k2Q38WueLNikGUX0EcXKDMIWen5M9i6gPM5Zj4=; b=FjCJZsS386js8A+aO8nl0MgDzJ09qJm6dhfOQ97RmhpQU+8zNmI6joLMMnmBFp+I/b rdtCGhoFR4/wNHZnMw/aDIf2dt3fR/O/daIdZg0gqe5LTKrNETcQmpNV/Ip7g2V5TtTg S/HYBuGVhYmIAOp0fd3HLoN0V8jvr9R/NskoBAhwBarumLXXLJEdLGDa3UnDqQm+hxJ1 W8BLsz9ggOrNYvOgz808T44EsJ0oDlZ5EkKTT66koF+yqyviiEI4snx0w9nqkeIIXpZm NCq8E1fUnKozkqTT2xbe5l/nnb4pEa01gJZvEzDicdDZNaptDHmHkhMieCZpKiDQ+Z7i +hQw== X-Gm-Message-State: ANhLgQ1TqjbMXg5sjMclZxGgvuYrgHmUnY7uomTMwk/pAz5AdnT/wFcw aKywOzdx+98kCyk9q9RDSq0= X-Google-Smtp-Source: ADFU+vtd+b65PXv741B2Xvl/VY102ZDKa3qJON+wOaBSCOeGYGNq4QbLyV54jjgen3Er7PN+hX2uRA== X-Received: by 2002:a17:902:ab95:: with SMTP id f21mr4077798plr.188.1583954370555; Wed, 11 Mar 2020 12:19:30 -0700 (PDT) Received: from localhost.localdomain ([103.46.201.94]) by smtp.gmail.com with ESMTPSA id z17sm3792673pff.12.2020.03.11.12.19.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Mar 2020 12:19:30 -0700 (PDT) From: Aman Sharma Cc: amanharitsh123@gmail.com, Thomas Petazzoni , Lorenzo Pieralisi , Andrew Murray , Bjorn Helgaas , Linus Walleij , Ryder Lee , Karthikeyan Mitran , Hou Zhiqiang , Marc Gonzalez , Mans Rullgard , Matthias Brugger , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [PATCH 3/5] pci: handled return value of platform_get_irq correctly Date: Thu, 12 Mar 2020 00:49:04 +0530 Message-Id: <9e2c5bf46fe04e27ead8d559425fb97231777ee1.1583952276.git.amanharitsh123@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Signed-off-by: Aman Sharma --- drivers/pci/controller/pcie-mobiveil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/controller/pcie-mobiveil.c b/drivers/pci/controller/pcie-mobiveil.c index 3a696ca45bfa..fe816a284dd4 100644 --- a/drivers/pci/controller/pcie-mobiveil.c +++ b/drivers/pci/controller/pcie-mobiveil.c @@ -456,9 +456,9 @@ static int mobiveil_pcie_parse_dt(struct mobiveil_pcie *pcie) pcie->ppio_wins = MAX_PIO_WINDOWS; pcie->irq = platform_get_irq(pdev, 0); - if (pcie->irq <= 0) { + if (pcie->irq < 0) { dev_err(dev, "failed to map IRQ: %d\n", pcie->irq); - return -ENODEV; + return pcie->irq; } return 0; From patchwork Wed Mar 11 19:19:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aman Sharma X-Patchwork-Id: 11432663 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AEA331392 for ; Wed, 11 Mar 2020 19:19:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2CBAE2074D for ; Wed, 11 Mar 2020 19:19:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eZXdYYUO" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731147AbgCKTTh (ORCPT ); Wed, 11 Mar 2020 15:19:37 -0400 Received: from mail-pj1-f68.google.com ([209.85.216.68]:33087 "EHLO mail-pj1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730807AbgCKTTh (ORCPT ); Wed, 11 Mar 2020 15:19:37 -0400 Received: by mail-pj1-f68.google.com with SMTP id o21so1853951pjs.0; Wed, 11 Mar 2020 12:19:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pOjQrnVayTgdrET4gCgzOMQ7+VznZ1NPyMucBXzQRTg=; b=eZXdYYUO9MJk8vDBz2ohUHhTlFQ6OUvKe5NJC3wwMup1+78yjzPuD0a1yqr7kKDAzn R6bakE9D6+2lnyfG457Nwws4+THsXyHBMV88kQa77cHLpoisL/FI1o5FbYjjD+Cho972 a/pSRcvr7B/YCgFV1J8wk+jRpXIpqHPrPXkUbPz86UioJj5qwacgDmZn15UmH5MpjSIm NvmTKUXeA4shooBgG2EMsAcLL3Sm7nQ72CXnpIBnlTEibmiT3TrxdnaIeopIbHLfMDA9 iCdUKJsTETkc/0yFfjDjJIJEzpVlInD/58X/THAjQ3ciF01RAOk751kpX86fuzJRi0o3 d2OA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pOjQrnVayTgdrET4gCgzOMQ7+VznZ1NPyMucBXzQRTg=; b=im5W9ds9G2tb1LIffJBVdjo6FKRMvXedDkQlplIvxaUJ4esXnjBBf5oX7ZwxCXFoVE HzYmeT4pzr23bXWFfiYSRKJLei+rZjPdG+9jlvSDk5xapH+5sWKkXC24OE83RWmLCYKz M8hyXx8pqaUsRdtjxRRGZurqiaJHB48v7Ge7quu+TTl2nZbcR0GdrrEFGYZDMnBXv5vs i9X17IAo9c3KxZmSuLABW59LRr+89QVL61Z9bKR/thNa7gIxKgiAQaCa15A/e6iMUGWv Nl2tLD9oXzGBpvpe0e9F/I0ORBL50IqXbfDhVl3Ng0rsXiehH/LBpZd5heuAVJvkdCSq 5JCA== X-Gm-Message-State: ANhLgQ1iaI6LB/7y8JS7HGrBD/rzJyzkhjJazNgNf6wi6R4WFqatEqc/ 1SwLRxxgs+L827Of+zo0UIU= X-Google-Smtp-Source: ADFU+vsSzPj8KundN3q85Ksdo5biFKHHfX+UdUbQyTZOldP1FMJEG8vyFDHt7yRgWjL+jYyHW5T0Zg== X-Received: by 2002:a17:90b:1a8b:: with SMTP id ng11mr201893pjb.173.1583954376003; Wed, 11 Mar 2020 12:19:36 -0700 (PDT) Received: from localhost.localdomain ([103.46.201.94]) by smtp.gmail.com with ESMTPSA id z17sm3792673pff.12.2020.03.11.12.19.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Mar 2020 12:19:35 -0700 (PDT) From: Aman Sharma Cc: amanharitsh123@gmail.com, Thomas Petazzoni , Lorenzo Pieralisi , Andrew Murray , Bjorn Helgaas , Linus Walleij , Ryder Lee , Karthikeyan Mitran , Hou Zhiqiang , Marc Gonzalez , Mans Rullgard , Matthias Brugger , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [PATCH 4/5] pci: handled return value of platform_get_irq correctly Date: Thu, 12 Mar 2020 00:49:05 +0530 Message-Id: X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Signed-off-by: Aman Sharma Signed-off-by: Bjorn Helgaas --- drivers/pci/controller/pcie-tango.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/controller/pcie-tango.c b/drivers/pci/controller/pcie-tango.c index 21a208da3f59..18c2c4313eb5 100644 --- a/drivers/pci/controller/pcie-tango.c +++ b/drivers/pci/controller/pcie-tango.c @@ -273,9 +273,9 @@ static int tango_pcie_probe(struct platform_device *pdev) writel_relaxed(0, pcie->base + SMP8759_ENABLE + offset); virq = platform_get_irq(pdev, 1); - if (virq <= 0) { + if (virq < 0) { dev_err(dev, "Failed to map IRQ\n"); - return -ENXIO; + return virq; } irq_dom = irq_domain_create_linear(fwnode, MSI_MAX, &dom_ops, pcie); From patchwork Wed Mar 11 19:19:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aman Sharma X-Patchwork-Id: 11432665 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9E78692A for ; Wed, 11 Mar 2020 19:19:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1C3E620746 for ; Wed, 11 Mar 2020 19:19:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CozuzMqF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731161AbgCKTTn (ORCPT ); Wed, 11 Mar 2020 15:19:43 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:41693 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730807AbgCKTTm (ORCPT ); Wed, 11 Mar 2020 15:19:42 -0400 Received: by mail-pg1-f193.google.com with SMTP id b1so1712040pgm.8; Wed, 11 Mar 2020 12:19:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6tx20opC58CZx8EHUzpcUW3v0td0yDhkgy01mmgvT1k=; b=CozuzMqFhVkFE6pdK3cIh6s0uXsG2lK7hYQy5IVZtcQmUzBEAvs4Pb139yfhgUcRa9 N2kLzQ5SjJ4V/dJTw7i+GKo/N1pv+gZxM58WXszNGBoQKI+uMjTkQV8zbt4kF/2vH6H5 NJvfcNhZFERyJC3It01naJmHSsln6g6kKl1vzNrulqq5LAHF4wgNhbVyandZgnizxIO/ cJgnDsnDD40sItIySZNC+HviwpK2K4wwHsgCEN7CPG5wC+lgXKwLhWQretoqWOKfhmxk PpPlksn5E6jm5/jvgOte7D5wpDz3s+voxXT0SDhgnRs5al+E5xvjKdYFYNU988j+8gtz FAuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6tx20opC58CZx8EHUzpcUW3v0td0yDhkgy01mmgvT1k=; b=jIgFx/QtIYgwYFdeAPXgprbyjO6ZrfFL18SiaZN7X3f53cLMpFBKGnbi3BbaqIit/q pESNyh+pD4zSV/ki3TfG4XNqjXcR4zK/Iaow357Sgk96YXhozYMom6HiR9DWTAecja9+ HDenUvmU04XVTT7arLGBXyF8Ti+JRWuF0EI6CL6gsfkbAztA+Ga2mDkrP6OzatVDYLuV OobbN9jH4LGZZNBGe2W8uRhB8Prp2H0HrUq90AyToV5L6h6l8YZGhl91TGthxTjnHHMD LHG9BLv6lQPoENukIjQnBEjrFnE+nROWMlBeY66gY32ifrLx7Vh50A8brWNDX7aEXXQJ F4ww== X-Gm-Message-State: ANhLgQ2VoxplZqDbwY3Gec1BAri3q1OXmFf8f+hErz3fh0TCJCr3Aq6u IDJkKIejlVGJpoHFrKSq/kM= X-Google-Smtp-Source: ADFU+vuIATg8TgONqQwj07uaBbQTUtMOLI517xnn/BWXZKYW/0G/Tlqgwm379phb/QVQVuzVzgf6SQ== X-Received: by 2002:aa7:90cc:: with SMTP id k12mr2456493pfk.94.1583954381475; Wed, 11 Mar 2020 12:19:41 -0700 (PDT) Received: from localhost.localdomain ([103.46.201.94]) by smtp.gmail.com with ESMTPSA id z17sm3792673pff.12.2020.03.11.12.19.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Mar 2020 12:19:41 -0700 (PDT) From: Aman Sharma Cc: amanharitsh123@gmail.com, Thomas Petazzoni , Lorenzo Pieralisi , Andrew Murray , Bjorn Helgaas , Linus Walleij , Ryder Lee , Karthikeyan Mitran , Hou Zhiqiang , Marc Gonzalez , Mans Rullgard , Matthias Brugger , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [PATCH 5/5] pci: added check for return value of platform_get_irq Date: Thu, 12 Mar 2020 00:49:06 +0530 Message-Id: X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Signed-off-by: Aman Sharma --- drivers/pci/controller/pcie-mediatek.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pci/controller/pcie-mediatek.c b/drivers/pci/controller/pcie-mediatek.c index cb982891b22b..ebfa7d5a4e2d 100644 --- a/drivers/pci/controller/pcie-mediatek.c +++ b/drivers/pci/controller/pcie-mediatek.c @@ -651,6 +651,9 @@ static int mtk_pcie_setup_irq(struct mtk_pcie_port *port, } port->irq = platform_get_irq(pdev, port->slot); + if (port->irq < 0) + return port->irq; + irq_set_chained_handler_and_data(port->irq, mtk_pcie_intr_handler, port);