Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1657053pxb; Mon, 23 Aug 2021 01:08:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyV3ggXywAgA1+JgGlc3OXRBy75qZacJKmFmQUu8LgjlEaC/iEevoDOnBCj9FCcG5sdcqbu X-Received: by 2002:a17:906:8804:: with SMTP id zh4mr5624757ejb.395.1629706111429; Mon, 23 Aug 2021 01:08:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629706111; cv=none; d=google.com; s=arc-20160816; b=QlSGQQGY8v8TkMIghi/DTvuB/gu0ogFs8GgwR2jzZIfLiaZEeY318c86lc4TwdZDlq Ip59LhTfolbV3QtO6HtIh5VUlrTU/bxWsMsUmQ2xc59ToarC1y54VI3fCBS03235u6eg 0nAOQw1BEp/al89NtDYGmmdMEVV4PCD8MW/OiTUlVXM8pIXfBT9FpYJ1RFAZfO+nsmIC pt20cTuGuSKDCrMraoyYxkbl1FQHZuMIIE89kZP+p/3eUqw6vKCf1I6yn6RpD219GmAL 8kA56RifBMN6c4fF7v2NTdzrhk8iq3suj+NokmR6/b1gDCUm4LHG3fMxrSeXqn5Dl2Fh 1Ylg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=D/zCG9ivFnH5oqg7ao6RBT5SBq8GrO87iHWo6rWwoX4=; b=pev8zAPf9gGAMLik/gNTFL5CT/vefG+EEAGA7dxKIF7UAJcKA2KOKE/UUUAsHyVT3h VbrqGMWREzz+m6SYTEGVQAAFGpUoNv9iR4xS3f3tqJH6aXpLz2V2/OcInSTzE7CZkEPj u72Q9rStOvQIPpXXj8djheom0ZV568Y2mSXMWw/MW6WXLp/AC29AAc2iTVqeLBAt2Dm1 A9iPsyl/gLJKAOHOB6cQ+6Qh2gE/tKiS/Rkl8shmj2HN0fCOZ4efjc3TU8lXmOflPLb9 A6VjZQz0nJyDhE18sIThHXR5SwzNoTBY6C+F5CCfCCCCM2oy9JrhkXaCMZ9DaCs1DhSJ yZiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=M4olpOi5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m20si13032031edc.375.2021.08.23.01.08.08; Mon, 23 Aug 2021 01:08:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=M4olpOi5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235329AbhHWIHh (ORCPT + 99 others); Mon, 23 Aug 2021 04:07:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235288AbhHWIHg (ORCPT ); Mon, 23 Aug 2021 04:07:36 -0400 Received: from mail-yb1-xb34.google.com (mail-yb1-xb34.google.com [IPv6:2607:f8b0:4864:20::b34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC202C061575 for ; Mon, 23 Aug 2021 01:06:54 -0700 (PDT) Received: by mail-yb1-xb34.google.com with SMTP id i8so32473420ybt.7 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=HKusCYYP6aqQdPizrKcYES3gcIL7QkTwDJDVaIn6Toa+9ic31NSPSACoY+TBnFh/F6 0CtRo4KvdD+xmklG29Xd5Iyu6P3LoAmTiuMjgj5X3M3f4PgJH+3rD7Lnrsdr/1z+9aRI PhM1z9OoChFJRz6g83W9kVfxV8NLWGFgN5mZAA/fBXYhYRbILkBAgL8/7QTDvPq6WA25 /LG5S1Qh8Wx31fkNy9E+2zx898hvQu49/KdvlOGgK4b0LfsL5TTPI+JSpwzR5YNE5anm 1vlHS83+7LGpSHI3bqYSs4TUvDufb3gyJhK7FpIltyb0AZ692XBNEM5mNgguKCPNOVtY I50Q== X-Gm-Message-State: AOAM533hxUPTOcybRexbTvGndwY6v5ptPq5vpKm/QKZvY+vcUnWFSbJl eI+q178fVaOzzM9HbKhYxxomQPEU4VNKpSKPeZzEtQ== 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-kernel@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