Re: [PATCH v3 1/3] acpi: property: Let args be NULL in __acpi_node_get_property_reference

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

 



Hi Andy,

On Thu, Nov 02, 2023 at 03:12:29PM +0200, Andy Shevchenko wrote:
> On Thu, Nov 02, 2023 at 12:13:14PM +0200, Sakari Ailus wrote:
> > fwnode_get_property_reference_args() may not be called with args argument
> > NULL on ACPI, OF already supports this. Add the missing NULL checks and
> > document this.
> > 
> > The purpose is to be able to count the references.
> 
> ...
> 
> > -		args->fwnode = acpi_fwnode_handle(device);
> > -		args->nargs = 0;
> > +		if (args) {
> > +			args->fwnode = acpi_fwnode_handle(device);
> > +			args->nargs = 0;
> > +		}
> >  		return 0;
> 
> In swnode case you used
> 
> 	if (!args)
> 		return 0;
> 
> approach. Why not here? It also makes diff cleaner, no?

I'll do that here, too.

-- 
Sakari Ailus




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux