From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6151CC77B7A for ; Fri, 2 Jun 2023 01:35:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231241AbjFBBfT (ORCPT ); Thu, 1 Jun 2023 21:35:19 -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> 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