lkml.org 
[lkml]   [2023]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3] i2c: ocores: use devm_ managed clks
On Thu, May 25, 2023 at 08:02:02AM +0300, Dan Carpenter wrote:
> On Wed, May 24, 2023 at 11:43:18PM +0800, Wang Zhang wrote:
> > @@ -780,19 +768,18 @@ static int ocores_i2c_resume(struct device *dev)
> > {
> > struct ocores_i2c *i2c = dev_get_drvdata(dev);
> >
> > - if (!IS_ERR(i2c->clk)) {
> > - unsigned long rate;
> > - int ret = clk_prepare_enable(i2c->clk);
> > + unsigned long rate;
> > + int ret = clk_prepare_enable(i2c->clk);
>
> Don't put functions which can fail in the declaration block. Generally
> the declaration block is for preliminary stuff, and the important
> actions should be in the code block. There should not be a blank line
> before the function call and the error checking.

s/before/between/.

regards,
dan carpenter

\
 
 \ /
  Last update: 2023-05-25 11:30    [W:0.104 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site