Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1674856rwd; Thu, 1 Jun 2023 20:54:06 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5YKJse/HyJdxHJiqqfhf9PPYIK+aprvl00HUvbcxxVLyHp+Ztd8HhT1ecvL62YWLpa4RZ6 X-Received: by 2002:a05:6808:ab0:b0:398:214d:16d4 with SMTP id r16-20020a0568080ab000b00398214d16d4mr1188317oij.30.1685678046554; Thu, 01 Jun 2023 20:54:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685678046; cv=none; d=google.com; s=arc-20160816; b=O72tG9OvQw1Aca8lHRzhKL4etfEuKJMl3gZjydD6rRVyzojKAF+w4SEFWRWEY5uikh uwg/r8wPVCcfxBw9LP0GakhsO9jpCSD9b276yLNGWGPBXinu9BQj1de+aepnSMCdUugM VAFcDvw1yAqo1dZ6jTkLOZaRV0/sVwi17VspZEtSpWrv6N5jjbtvpc8uPED5RUtvKuBU 5tlF2jyCNQOgCPcU0jJ8GD+OCrf/1to8Je/tucTqBNYdiCCGAwhlTyXUEfYeAkujbiAi CRvIi2DhuwzhoRCP03XVBGKHE2VAT0MsdKc9R1vueGy+a3mEqTcAhzFX9KX/OgarL/J7 8upg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=zxIpz8G19lPZTh9AEWgj3RatlMUHjOr27jp7qaCugKU=; b=Mf5HvpM/agB2k/NkR5U8rGi+rxLze5CISkm9WCT28SBgNE7nA1JhrZK86/sCmzr0mk DCFU+g5jL5V5oCgIPhLfZhy00ivGWPJy7441kiRdQJFcYbqRrSCal95ME7YXpxdC5kMI ifd6bIu3npl750XvOErUy6+eXqANeDXYwLQvil4ACZu/yc0kANLo50IhB8I9UVJkRr+u tqtRdWh4ZxPMOd3ZNT0NI64fXyA9hveGZH1cOpN7aeu37Yu/uMPnZlGTJFDPwp8esYK6 /funiNsL0BhpFxx3hgZ5rqjYWbtEtMYOKp27WWtVpp/MyJODrRYuRqbHc/qr7lnxY1xo 6slg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r22-20020aa79636000000b0064f53ab09bfsi59069pfg.177.2023.06.01.20.53.52; Thu, 01 Jun 2023 20:54:06 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233541AbjFBDPq (ORCPT + 99 others); Thu, 1 Jun 2023 23:15:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233335AbjFBDPm (ORCPT ); Thu, 1 Jun 2023 23:15:42 -0400 Received: from cstnet.cn (smtp81.cstnet.cn [159.226.251.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF0B61A2; Thu, 1 Jun 2023 20:15:36 -0700 (PDT) Received: from localhost.localdomain (unknown [124.16.138.125]) by APP-03 (Coremail) with SMTP id rQCowACnrCzQXnlkqO1bCQ--.64497S2; Fri, 02 Jun 2023 11:15:28 +0800 (CST) From: Jiasheng Jiang To: andy.shevchenko@gmail.com Cc: albeu@free.fr, linus.walleij@linaro.org, brgl@bgdev.pl, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Jiasheng Jiang Subject: Re: [PATCH] gpio: ath79: Add missing check for platform_get_irq Date: Fri, 2 Jun 2023 11:15:26 +0800 Message-Id: <20230602031526.45447-1-jiasheng@iscas.ac.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: rQCowACnrCzQXnlkqO1bCQ--.64497S2 X-Coremail-Antispam: 1UD129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UjIYCTnIWjp_UUUYO7AC8VAFwI0_Gr0_Xr1l1xkIjI8I6I8E 6xAIw20EY4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM28Cjx kF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVW8JVW5JwA2z4x0Y4vE2Ix0cI8I cVCY1x0267AKxVWxJVW8Jr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z2 80aVCY1x0267AKxVWxJr0_GcWle2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IE w4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r1j6r4UMc vjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvY0x0EwIxGrwACjI8F5VA0II8E6IAqYI8I648v 4I1lc2xSY4AK67AK6r48MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI 8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AK xVWUAVWUtwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI 8IcVCY1x0267AKxVWUJVW8JwCI42IY6xAIw20EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280 aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43 ZEXa7VUjQBMtUUUUU== X-Originating-IP: [124.16.138.125] X-CM-SenderInfo: pmld2xxhqjqxpvfd2hldfou0/ X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 02, 2023 at 09:32:00 +0800, Andy Shevchenko wrote: > Thu, Jun 01, 2023 at 04:51:32PM +0800, Jiasheng Jiang kirjoitti: >> Add the missing check for platform_get_irq and return error >> if it fails. > >> girq->parents[0] = platform_get_irq(pdev, 0); >> + if (girq->parents[0] < 0) >> + return -ENODEV; > > Can you elaborate why error code has to be shadowed (overriden)? You are right. Returning the error code is better. I will submit a v2. The same goes for the other patch "gpio: sifive: Add missing check for platform_get_irq". Thanks, Jiasheng