From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Shevchenko Subject: Re: [PATCH 2/2] i2c: designware: Add support for a bus clock Date: Tue, 17 Jul 2018 17:18:32 +0300 Message-ID: <40f2729f38bd565a829d60d9cc8f508e33b0dc65.camel@linux.intel.com> References: <1531731553-22979-1-git-send-email-phil.edworthy@renesas.com> <1531731553-22979-3-git-send-email-phil.edworthy@renesas.com> <20180717120737.bipotpki3yhn6klf@verge.net.au> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Phil Edworthy , Simon Horman Cc: Jarkko Nikula , Geert Uytterhoeven , "linux-i2c@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-renesas-soc@vger.kernel.org" , Mika Westerberg List-Id: linux-i2c@vger.kernel.org On Tue, 2018-07-17 at 12:42 +0000, Phil Edworthy wrote: > > While your point sounds valid (don't remember how clk_get() is > > implemented), NULL is also OK to have. > > Ok as in there is no bus clock, right? > So it should be: > if (!IS_ERR_OR_NULL (dev->busclk)) Nope, NULL is no error case for optional clock. -- Andy Shevchenko Intel Finland Oy