Re: [PATCH v2 2/5] PCI/pwrctl: Create pwrctl devices only if at least one power supply is present

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

 



Hello,

[...]
> > > > +bool of_pci_is_supply_present(struct device_node *np)
> > > > +{
> > > > +     struct property *prop;
> > > > +     char *supply;
> > > > +
> > > > +     if (!np)
> > > > +             return false;
> > >
> > > Why do we need to test !np here?  It should always be non-NULL.
> > >
> > 
> > Right, I think this can be dropped. We check for the OF node in the
> > function above.
> > 
> 
> I think it was a leftover that I didn't cleanup. But I do plan to move this API
> to drivers/of once 6.13-rc1 is out. So even if it didn't get dropped now, I will
> do it later.

I removed the NULL check directly on the branch.  Thank you!

	Krzysztof




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux