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 X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3CDD8C4320A for ; Mon, 23 Aug 2021 08:06:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 23B0C6135F for ; Mon, 23 Aug 2021 08:06:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235398AbhHWIHh (ORCPT ); Mon, 23 Aug 2021 04:07:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235329AbhHWIHg (ORCPT ); Mon, 23 Aug 2021 04:07:36 -0400 Received: from mail-yb1-xb35.google.com (mail-yb1-xb35.google.com [IPv6:2607:f8b0:4864:20::b35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD156C061756 for ; Mon, 23 Aug 2021 01:06:54 -0700 (PDT) Received: by mail-yb1-xb35.google.com with SMTP id f15so4181629ybg.3 for ; Mon, 23 Aug 2021 01:06:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=D/zCG9ivFnH5oqg7ao6RBT5SBq8GrO87iHWo6rWwoX4=; b=M4olpOi5c6kiBdUGJ3UItw1G0SBvluTYJzZRYymjprivaDsdZK6MnPhB8usOxlLa7w W2zaXqSeW3Jbn7b+OoyNQJbyiMKgp6tjk8VW9oUJtXG9+PNzpYoGoNDvj79Ic4bi/zMs E3cwLugJU1+jXscaCQzEhdeyGlKrRByY59Psvoep+iZZ+oQWNrQoockrhDzNpQ06//oH mVIGNe/UcjjLC0Z2pnb8RYE0BiDcpzktqUuX44YXiSZRTvMJmfJFaQRkkyA3SXMuTnH6 CEybtA554/XPXAYQ8Rs9CoiP9lXB8cAZYwSJzqWIlTxxzX+uD1Jlp936JYAYSWl2ry/7 Bctw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=D/zCG9ivFnH5oqg7ao6RBT5SBq8GrO87iHWo6rWwoX4=; b=BD5nI2ROAGvV3eWzt9N+a2YYBHWHtn2IE39lzk7dHAm0AKZHKF9tG01CVVOIvzw8mN nAlapn7nYPwurllNed4XNzs7O1Pl2FAQJaUC3Agt54BZ3SVVZKGr3T4IyzlOMG2l4e+m WT/T4YjBhn9Q/Epnv2x9zcXGMxPi3IrFHa/UkF3jSaGHx59fqdKthdoY8nTOKhYIdwtu ve8XVH5oY7fjNyQNGAEqjlA6Kmn8pdPgrnLMcpcz40aIYMVbW1v6IkV/E/X3/lTxjQt8 cKOm/OwyfHhg2sKH8J25NR1lxhUCxZ3YduxrfgQNwuU69LxYTU8TuTaSNDN8Zh5WDk3Q hpYA== X-Gm-Message-State: AOAM533V1b7xcs6AUwdBfW3t29tM7mffOelcvpQAq6RLFfGjWE2dJLYn j5ngBIWHnbfMJCJjfVMBan/AmDEACCC7Wzni8GdDzQ== X-Google-Smtp-Source: ABdhPJzFQqLG99qfpoMaXnaBRKXLdVxUqfwc1eLs6IWkwE8rXnfq1pJ040CA+QX5zWWtABZR4cqJRYtZ2jB0Ao4oFHI= X-Received: by 2002:a25:21c5:: with SMTP id h188mr40272726ybh.23.1629706013975; Mon, 23 Aug 2021 01:06:53 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Bartosz Golaszewski Date: Mon, 23 Aug 2021 10:06:43 +0200 Message-ID: Subject: Re: [PATCH 0/3] gpio: mpc8xxx: Fix 3 errors related to the error handling path of the 'mpc8xxx_probe()' To: Christophe JAILLET Cc: Linus Walleij , alexandru.marginean@nxp.com, Laurentiu.Tudor@nxp.com, Hui Song , Andy Shevchenko , Ran Wang , linux-gpio , LKML , kernel-janitors Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Fri, Aug 20, 2021 at 5:37 PM Christophe JAILLET wrote: > > This has been split in 3 patches because: > - the root issue of patch 1 and 3 is not the same commit as the one for patch 2. > - the strategy to fix the issues is not the same > - patch 1: add a new call in the rror handling path > - patch 3: switch to a resource managed function > > They could be merged together if easier to review. The subject would then be > something like "gpio: mpc8xxx: Fix the error handling path of 'mpc8xxx_probe()'" > > If prefered, 'devm_add_action_or_reset()' could be used to switch the probe to > a fully managed resource function and remove the 'remove' function. > That's mostly a matter of taste. > > If such an option is preferred, I'm a bit puzzled by the > 'irq_set_chained_handler_and_data()' call in the remove function because I > don't see why it is there. > Also see the comment at the end of patch 1 also related to this function call. > > > Christophe JAILLET (3): > gpio: mpc8xxx: Fix a resources leak in the error handling path of > 'mpc8xxx_probe()' > gpio: mpc8xxx: Fix a potential double iounmap call in > 'mpc8xxx_probe()' > gpio: mpc8xxx: Use 'devm_gpiochip_add_data()' to simplify the code and > avoid a leak > > drivers/gpio/gpio-mpc8xxx.c | 13 +++++-------- > 1 file changed, 5 insertions(+), 8 deletions(-) > > -- > 2.30.2 > Hi Christophe, These look good but I'm leaving for a couple days in an hour so I won't be able to send a PR to Linus before the next release. I'll make these part of my regular PR for the upcoming merge window. Bart