Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1580232rwd; Thu, 1 Jun 2023 18:46:09 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ50PxfXQsxmD5145+7r2HW1f1k1/QJL0ZH2/1tUlOOsk/iFIXbWrI83dDEVhsjHqNB77kqn X-Received: by 2002:a05:6a00:18a1:b0:648:1311:fbc4 with SMTP id x33-20020a056a0018a100b006481311fbc4mr14570684pfh.33.1685670369104; Thu, 01 Jun 2023 18:46:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685670369; cv=none; d=google.com; s=arc-20160816; b=F/LhIQ19cLLzSgdbGoTr0LpMH0iJxHuGdLYWCgK7NTuMb+a/c+1PIYKLgLgkbXA//R KRdyz7yG6XhpUlVNUhv1z/GqW/xC+S8dW/W70CeSAuRkMgszSKg/wt83EU7w2yMKbNhc VjSYoDD0nj0DjPJq9v4Atld7LfczWb680B2Ido1HIFB/GkIiE5tCCFJEWPYYts9CeBzd 4pBldvTG1DXLtqk8FKPKQqltQJ4mMcgbihFhekuC85WUhY8/AnJosht/pNpAt12qDlpo /ZOdfGSvDjB5hYXSjHTH3y3fk2OVZASnOmrWuN7MHFePhBTMc0wzAiBL5VxZvA/fqN9r 50bQ== 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=oq0Y+IW5GlS3Y4J28OhZT2w5b6wnAWZWZfUBekQpweM=; b=eqJErM1VrRTX+OdmO4p7vGX3y+MFTOceYrYNuQG/bIiebfVBk5pJiVcy4TpjVxuyvE FTbelrTxDsXOx8al30i+PJ+OUd4Cw78pVEf621uhLOBjtIK1oJQzNYcUklfIb6Ab/HQ8 Jg5jo/knp+7TMw0yEMVhyvwyMwjjeZapRrXGZCyGEf+QOaTt/ljbHzV+gJ0V0rdYAHfT WBDNWlpzoNDjiwejgFl6uFd//rznRFHSNOSaJ6410CyR5N4oxghBxj4Ta+E7I3jPQq9m on/WlxGZjAIeu+M6Z7HsIKo6ML2CmLGGYYHc2Ip+lv/JHgNP9IHetHiqCtDshYd0guXB LPyA== 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 y27-20020aa78f3b000000b0063b7e177fc3si6145762pfr.165.2023.06.01.18.45.55; Thu, 01 Jun 2023 18:46:09 -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 S233304AbjFBBcF (ORCPT + 99 others); Thu, 1 Jun 2023 21:32:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233143AbjFBBcE (ORCPT ); Thu, 1 Jun 2023 21:32:04 -0400 Received: from fgw21-7.mail.saunalahti.fi (fgw21-7.mail.saunalahti.fi [62.142.5.82]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30336128 for ; Thu, 1 Jun 2023 18:32:03 -0700 (PDT) Received: from localhost (88-113-26-95.elisa-laajakaista.fi [88.113.26.95]) by fgw21.mail.saunalahti.fi (Halon) with ESMTP id 453e3234-00e5-11ee-abf4-005056bdd08f; Fri, 02 Jun 2023 04:32:00 +0300 (EEST) From: andy.shevchenko@gmail.com Date: Fri, 2 Jun 2023 04:32:00 +0300 To: Jiasheng Jiang Cc: albeu@free.fr, linus.walleij@linaro.org, brgl@bgdev.pl, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] gpio: ath79: Add missing check for platform_get_irq Message-ID: References: <20230601085132.12508-1-jiasheng@iscas.ac.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230601085132.12508-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: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)? -- With Best Regards, Andy Shevchenko