Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1583962rwd; Thu, 1 Jun 2023 18:50:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4UO2NdACbsSRHHmQ7QmPL3jw4VyUIzX7HL4xrVXW8xGeHHedxaEMRK6msh4fu9kcR/pf44 X-Received: by 2002:a05:6a20:94ce:b0:10a:9f55:292b with SMTP id ht14-20020a056a2094ce00b0010a9f55292bmr10221797pzb.57.1685670653308; Thu, 01 Jun 2023 18:50:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685670653; cv=none; d=google.com; s=arc-20160816; b=P/W1uAv9usgacG8ADtG4GoQ3xWuy6ULzdSiZZu/9T78gkLYJCh9wwT7SBO6YhwvutU 06UVjKsZUfKuGumyDiR2Tp2/9uzR0JmK+3oYvXOmiF2hoz4Zs9YsN4aFQFZSl64Y8fa1 /NS8rFR0kPAHTHXmiiYKZ9ixoD+mXbgqgbDx6k16L5u+y4t3WGYWFTdFp/lS0RVYsv6z VguXadPYgLoJRsPLTJ8Zog9nuhT+sFGZInwNMg6ZT0SCMkwD7jDL4jeI6nXgv4kYCS8n czKq2RZRsXquh4KIZMT3AeKMvpq/Oz2JVZgMMzU7/Kg8ZShcMLWmIM7ue0rK54np+3tD 4hqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:date:from; bh=tpoocXVqWhpQcneeagekdeM1ahXLEQZhvLwlK2M7Aj8=; b=0bpAUAdGanoBnYIpIyaBt9vwlUzAmQoQzHbwJBibHMJwy4Aa6K5QLHjIaS2qGrMf+f yjDr7eX1aG2XCKlqIALGI1bCI/RGu+G/gI8HlFNUZJZntfiWY+8vEDe1hdnHVaUoJwJ9 HjHDIbQ5V3TSiv+EEEtGa6AIzM88y59cUlrVElYJfGmenjlp8ftaD7SBdZqSKQYg3hl1 Ul4c4Up0TyYxuMBnl6+kvP/4ROnA0p0Vnp6C7jnK5UU6huvUC6x7GOIdcTPtuF1FGS59 NGhreCeKN5iECV+6g3NxgbAb/Fw1gtHDiBZ91pmSWPE8Bu8HC2UeEo2XyhuIHpAwtwOH avlw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i8-20020a633c48000000b0050be067284bsi138862pgn.556.2023.06.01.18.50.39; Thu, 01 Jun 2023 18:50:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233664AbjFBBfR (ORCPT + 99 others); Thu, 1 Jun 2023 21:35:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233485AbjFBBes (ORCPT ); Thu, 1 Jun 2023 21:34:48 -0400 Received: from fgw22-7.mail.saunalahti.fi (fgw22-7.mail.saunalahti.fi [62.142.5.83]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5C02133 for ; Thu, 1 Jun 2023 18:34:43 -0700 (PDT) Received: from localhost (88-113-26-95.elisa-laajakaista.fi [88.113.26.95]) by fgw22.mail.saunalahti.fi (Halon) with ESMTP id a4e8b064-00e5-11ee-a9de-005056bdf889; Fri, 02 Jun 2023 04:34:41 +0300 (EEST) From: andy.shevchenko@gmail.com Date: Fri, 2 Jun 2023 04:34:40 +0300 To: Jiasheng Jiang Cc: linus.walleij@linaro.org, brgl@bgdev.pl, palmer@dabbelt.com, paul.walmsley@sifive.com, linux-gpio@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] gpio: sifive: Add missing check for platform_get_irq Message-ID: References: <20230601082440.30110-1-jiasheng@iscas.ac.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230601082440.30110-1-jiasheng@iscas.ac.cn> X-Spam-Status: No, score=0.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FORGED_GMAIL_RCVD,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,SPF_HELO_NONE, SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thu, Jun 01, 2023 at 04:24:40PM +0800, Jiasheng Jiang kirjoitti: > Add missing check for platform_get_irq and return error Also refer to the functions as func(), like platform_get_irq(). > if it fails. ... > + for (i = 0; i < ngpio; i++) { > chip->irq_number[i] = platform_get_irq(pdev, i); > + if (chip->irq_number[i] < 0) > + return -ENODEV; Same as per the other email, why has the error code to be shadow? > + } -- With Best Regards, Andy Shevchenko