Received: by 2002:a05:6a10:5594:0:0:0:0 with SMTP id ee20csp582405pxb; Mon, 25 Apr 2022 17:14:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxC6KkUabP/4ggy5Yl/wlhTfB06jPY+1VYou1OUB4vmVQ7rUxERNnmZWT1dy2nwm1493JWq X-Received: by 2002:a17:907:72d5:b0:6ef:a49f:133a with SMTP id du21-20020a17090772d500b006efa49f133amr19023905ejc.420.1650932067646; Mon, 25 Apr 2022 17:14:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650932067; cv=none; d=google.com; s=arc-20160816; b=luPnxOq7cf7KcyvsIwS/G2K0uQZe0DWMZo9naLWjdz/h8WuDye3L1ndnCtQx8IPNEs x21J2TO9AQ7kkER3QhtuFxei1bZG7AR1I2DBd2ZyLbIJ5PuljdfccHTuxbYB/U2oWIA4 uOjxx1y1EXoHuqv+1qiX+OPYRjW7qWJPw1iMy3x3QqdqfO+7RHnt9QHUMCrrlI3ocF99 p4JipIAJJyBLe4RdmBsF2rBgarpGOaM+YVXfFuFAu9A0TXxiCFqz1XkpxXIQWLGVBSMm +Nr+qhX1BWAeYAXLsHfPu6zjYHGW4mCv6G7IhWdpGjvePuhlxdGcNMJuGAq8sf1BMNmb yy7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=OK19n+m1ia0AvbicuwhlyDzdc6ZfDPD79FFg+tUCY50=; b=mN+HjWwtJkBzWMfSHAgYiunzlsU39VUYGp/RGgI0+EZhR/h2v/NqAYieNHD1/5vcb8 Xb8EMmToqL8pOW5qAcduBQ6DYdDx/IWZ6XhBRkv2l+Sv4ldC6CLnDiVe6Df4zlGjmuzY pLyLvix0XyViZH9z570F3wlJETzzwBQWfS8DTTApI6FIjzsYdR8F63gNhL9wcIfl23/W Y6T3VNHlCyf6sq3jPnfzRDxGvN3l+y/20PmxskiCgIuITX3hyVPGvF8xIMtzTereoJZU fNw1orrg4OxALP+hVeX9Rp6jPXJAyw/oLl+YffDUq870RCG/Z4z28ZA4zjL3f8ieGxqT Ndbw== 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 ov8-20020a170906fc0800b006e89f4b0cd2si4859952ejb.403.2022.04.25.17.14.04; Mon, 25 Apr 2022 17:14:27 -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 S237226AbiDYJsv convert rfc822-to-8bit (ORCPT + 99 others); Mon, 25 Apr 2022 05:48:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234226AbiDYJss (ORCPT ); Mon, 25 Apr 2022 05:48:48 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1787A6559 for ; Mon, 25 Apr 2022 02:45:45 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nivHg-0006sC-Bl; Mon, 25 Apr 2022 11:45:32 +0200 Received: from [2a0a:edc0:0:900:1d::4e] (helo=lupine) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1nivHf-0057VX-Sy; Mon, 25 Apr 2022 11:45:30 +0200 Received: from pza by lupine with local (Exim 4.94.2) (envelope-from ) id 1nivHd-0004pV-OZ; Mon, 25 Apr 2022 11:45:29 +0200 Message-ID: <59b135206b456fd8f8df30a4e474e385a922bf77.camel@pengutronix.de> Subject: Re: [PATCH 2/2] phy: qcom-qmp: fix reset-controller leak on probe errors From: Philipp Zabel To: Johan Hovold , Kishon Vijay Abraham I , Vinod Koul Cc: Andy Gross , Bjorn Andersson , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Vivek Gautam Date: Mon, 25 Apr 2022 11:45:29 +0200 In-Reply-To: <20220422130941.2044-3-johan+linaro@kernel.org> References: <20220422130941.2044-1-johan+linaro@kernel.org> <20220422130941.2044-3-johan+linaro@kernel.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 Hi Johan, On Fr, 2022-04-22 at 15:09 +0200, Johan Hovold wrote: > Make sure to release the lane reset controller in case of a late probe > error (e.g. probe deferral). Right. grepping for "of_reset_control_get", there seem to be are a few other drivers that might share the same issue... > Note that due to the reset controller being defined in devicetree in > (questionable) "lane" child nodes, devm_reset_control_get_exclusive() > cannot be used (and we shouldn't add devres helpers for the legacy reset > controller API). Do you mean of_reset_control_get()? Maybe you could switch to of_reset_control_get_exclusive() while at it? That one might warrant a devres helper if other drivers were to adopt the same pattern. The patch itself looks fine to me, Reviewed-by: Philipp Zabel regards Philipp