Search Linux Wireless

Re: [PATCH v4 4/5] wifi: brcmfmac: Add optional lpo clock enable support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 29, 2024 at 09:12:20AM GMT, Dragan Simic wrote:
> Hello Jacobe,
> 
> [...]
>
> > 
> > +	clk = devm_clk_get_optional_enabled(dev, "lpo");
> > +	if (IS_ERR(clk))
> > +	if (clk) {
> 
> These two lines looks really confusing.  Shouldn't it be just a single
> "if (!IS_ERR(clk)) {" line instead?

It should be `!IS_ERR(clk) && clk` otherwise the debug message will be
incorrect.

Kind regards,
	o.

> > +		brcmf_dbg(INFO, "enabling 32kHz clock\n");
> > +		clk_set_rate(clk, 32768);
> > +	}
> > +
> >  	if (!np || !of_device_is_compatible(np, "brcm,bcm4329-fmac"))
> >  		return;




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux