Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4413057ioa; Wed, 27 Apr 2022 03:22:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxdvf1hNVtMmyRoBoEjKhxlaR3Bzwrpyk6uscpU5IH3JGVwZZ1WLM8CbgsLmI7Lv4U4jYN X-Received: by 2002:a63:f857:0:b0:3ab:2243:4b1a with SMTP id v23-20020a63f857000000b003ab22434b1amr14287087pgj.163.1651054945348; Wed, 27 Apr 2022 03:22:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651054945; cv=none; d=google.com; s=arc-20160816; b=xxhrqRO7MAGWLtEgr3DraltjXrK2PmO/vTEcSyWFvVb6Gosj4s3q9WcOieu6LzgjNN 7HcF+nNrGrswgL6kTqbG//x/ZbxqzBv1RYUfpEvOG0OIrlcRzDZhCkppbh0v1ImfTwhP gxpwGECSZUG0XHaB8t+eAxEfzFLtLeBqKhqf7voJQYZtFkwY5DVAwi5UZrwQ9gXyE7a7 1VWP0Dd7PwnnMQ3NojqGZDK9NO+yYNPAqpayWo9SVWLzcxCefIIjSu9DUGG2ttkxa8nj m0TwN1gZUI6Rb6twgJ4TYnJmcMja28JRBazYdXb83FhEHFe+ZWyQRDQ5v8aDDGJ0P1cK g+kA== 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:from:date:dkim-signature; bh=sA0pvbfxD788Mp+NYu5qeWatYoMZS+NXRRkOKZOLfig=; b=cwXnrYI1RUPmx1OTZULnL1NMGXyLwt6eT8FVos6njEM5BLw8E9hpi8/uvn3GaVNJDQ XhZULm8h77zDV9X91IBE07M3BwQ8uDs3LXAjfMuBRW+FvHB0x8vf8EoxTTi9yrdm8hVb Rwix7dzBTPewjHvhKdhiuGHU+AQ5XE5jiFdJrmBb0+azBq4gzZBG6j3Uk7C2RXUZBezZ pE0wHueT+Rh1pIlFLFcX/ian0otBEQqeOGHo5L1KqIe4LLCj7SSvzR5B0GV9B+QqPnmU +QmkwlNtHdPyk/JZMjpVtqSBNr8Zp1GgcAvXR8eQOojQ85GHq+uUlxRKYo7BEoFSXyus jGSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OEfFw5R3; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id nn16-20020a17090b38d000b001da3b4da3fdsi1165417pjb.54.2022.04.27.03.22.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 03:22:25 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OEfFw5R3; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 96054375495; Wed, 27 Apr 2022 02:41:12 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357958AbiD0GEz (ORCPT + 99 others); Wed, 27 Apr 2022 02:04:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357954AbiD0GEy (ORCPT ); Wed, 27 Apr 2022 02:04:54 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5979146163; Tue, 26 Apr 2022 23:01:44 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id F37C2B823F1; Wed, 27 Apr 2022 06:01:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B4BA5C385A7; Wed, 27 Apr 2022 06:01:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651039301; bh=vrSKVfzDuthRYBdUjrjFxhx98WWa/Du4tj2i28+8jhE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OEfFw5R30Zg7fXlsRxQJh/mLBRyQVwhu8NnsvUmUl7RvZ8MLkQdTxC+SynmyQGRAX SX8ommb4WBMGfD4UkluVFED3wsgNdbiL3E/Nyf1oSEjMrFcWxAykXoTGLCq2ahtLbg SKd7fLyCEi9dp0zkMuF+QUOu4m40sKBNHrYDL0a4vdYFLjvbgzZ+uzm4flH1rK/I1J OUNADI/y9fGtuHVkaDvo2uDEmGXeLqNgoDyyXYCclqF/ajSoxcP8Oe0ND3wMp9as5i Lw3aoun+ORwsIkLLXeZKWSG2tpCxcWD82ySLMxdH9M1XLYqStNUu1n6DeD8AzHkAdB OULQUiACm4BaQ== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1njakA-0000EW-Sx; Wed, 27 Apr 2022 08:01:42 +0200 Date: Wed, 27 Apr 2022 08:01:42 +0200 From: Johan Hovold To: Philipp Zabel Cc: Johan Hovold , Kishon Vijay Abraham I , Vinod Koul , 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 Subject: Re: [PATCH 2/2] phy: qcom-qmp: fix reset-controller leak on probe errors Message-ID: References: <20220422130941.2044-1-johan+linaro@kernel.org> <20220422130941.2044-3-johan+linaro@kernel.org> <59b135206b456fd8f8df30a4e474e385a922bf77.camel@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <59b135206b456fd8f8df30a4e474e385a922bf77.camel@pengutronix.de> X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE 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 On Mon, Apr 25, 2022 at 11:45:29AM +0200, Philipp Zabel wrote: > 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... Yeah, I'm sure there are more of these. > > 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? Right, I was referring to of_reset_control_get() but obviously of_reset_control_get_exclusive() could still get a devres version so that sentence in parenthesis doesn't make much sense. I must have mistakingly imagined that the latter also retrieved the struct device_node from a struct device like the current devres helpers do. > That one might warrant a devres helper if other drivers were to adopt > the same pattern. Right. > The patch itself looks fine to me, > > Reviewed-by: Philipp Zabel Thanks for reviewing. I'll send a v2 with an updated commit message and switch to the new API in a new follow-on patch. Johan