Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp469571pxb; Wed, 24 Feb 2021 07:02:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJwGmnRX/pWtWZUQqATR5+B7obeuyizXQvNKZC3RGt7RlvpHkcBcbmx6iE6YAKgLDHi0Z5us X-Received: by 2002:a50:d307:: with SMTP id g7mr33660898edh.204.1614178921444; Wed, 24 Feb 2021 07:02:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614178921; cv=none; d=google.com; s=arc-20160816; b=ar2Ai2IbNsbJSI1j+8YXzxFR+PP6b+hF7FVcbpDX5gB8LkA9jZgYfL7g+Q+yarT/x/ etT9EGDZfuoBksg6KEnqlluuv7SVqIFXPvGWL0jTiXJdWNqFGTCVb7SFliXVDIRla1bu dQL3gPK7hmazuxFL8wFXZLM6iGqVAxVJ+BE836SD/gWmKRER2ISmYiJ1gMnyxB5W7BHQ U4A4JOPYubFoJ0O7UifrZFMjuetjeBVFh74jI+VAiyV74RGWPjHEYqQXv6g39YKw+ZAI WcJrbIS+FyrOjWPSYMLtj1qZK8UvHMI5wk0qr4UacagZYogYoNZm0aAPnSIEXtpIpAvB sdpg== 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; bh=HEpKKI+QznmXeg3mGDS05d401X58NI9YllUsDw1Fse0=; b=isd3rK9HY3C1VBF1/E1K/Tb0XQsx1Sa2um422FjI9m1m5V0SrefMJJAwaflv421aBN To9sdtqE7QNUjZ7llvcUQS/oZjJrgRD35QZAphqUMrgi13EqehHF9V3e8J9nUSUxERI/ Rdim0XbPFKHmT/wCCgMMDYqPS5XPI42Mmrh66tlKF1HVrnu6mZnA8sChWlOIdIqK62R+ INQ4llDRwrYCY4ZoWKhsCi3RISbNNuzZgcohNiM7z29Qaq4f/I515RBAKF1HViuLGEND HakRzpXefFXD8ITr6vbqng+G+W11BS8R2bEDstDOs4U2JU7az87bp96VFRXtJKRE/ZWT XcEw== ARC-Authentication-Results: i=1; mx.google.com; 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 ke17si1386509ejc.582.2021.02.24.07.01.15; Wed, 24 Feb 2021 07:02:01 -0800 (PST) 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; 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 S235307AbhBXOyS (ORCPT + 99 others); Wed, 24 Feb 2021 09:54:18 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:55860 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237844AbhBXNss (ORCPT ); Wed, 24 Feb 2021 08:48:48 -0500 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1lEuWB-008EUB-7q; Wed, 24 Feb 2021 14:47:55 +0100 Date: Wed, 24 Feb 2021 14:47:55 +0100 From: Andrew Lunn To: Adam Ford Cc: netdev@vger.kernel.org, aford@beaconembedded.com, Sergei Shtylyov , "David S. Miller" , Jakub Kicinski , Rob Herring , Geert Uytterhoeven , Magnus Damm , linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V3 4/5] net: ethernet: ravb: Enable optional refclk Message-ID: References: <20210224115146.9131-1-aford173@gmail.com> <20210224115146.9131-4-aford173@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210224115146.9131-4-aford173@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > @@ -2260,6 +2267,9 @@ static int ravb_remove(struct platform_device *pdev) > if (priv->chip_id != RCAR_GEN2) > ravb_ptp_stop(ndev); > > + if (priv->refclk) > + clk_disable_unprepare(priv->refclk); > + Hi Adam You don't need the if (). The clk API is happy with a NULL pointer and will do the right thing. Otherwise: Reviewed-by: Andrew Lunn Andrew