lkml.org 
[lkml]   [2020]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v13 2/2] Add PWM fan controller driver for LGM SoC
On Thu, Sep 24, 2020 at 08:55:34AM +0200, Uwe Kleine-König wrote:
> On Tue, Sep 15, 2020 at 04:23:37PM +0800, Rahul Tanwar wrote:

...

> > + ret = lgm_clk_enable(dev, pc);
> > + if (ret) {
> > + dev_err(dev, "failed to enable clock\n");
>
> You used dev_err_probe four times for six error paths. I wonder why you
> didn't use it here (and below for a failing pwmchip_add()).

dev_err_probe() makes sense when we might experience deferred probe. In neither
of mentioned function this can be the case.

> > + return ret;
> > + }

...

> > + ret = lgm_reset_control_deassert(dev, pc);
> > + if (ret)
> > + return dev_err_probe(dev, ret, "cannot deassert reset control\n");
>
> After lgm_reset_control_deassert is called pc->rst is unused. So there
> is no need to have this member in struct lgm_pwm_chip. The same applies
> to ->clk. (You have to pass rst (or clk) to devm_add_action_or_reset for
> that to work. Looks like a nice idea anyhow.)

True. And above dev_err_probe() is not needed.

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2020-09-24 15:39    [W:0.121 / U:1.476 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site