lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZSAs5ocT6kEIXb0S@smile.fi.intel.com>
Date:   Fri, 6 Oct 2023 18:51:02 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Hans de Goede <hdegoede@...hat.com>
Cc:     acpi4asus-user@...ts.sourceforge.net,
        platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org,
        Corentin Chary <corentin.chary@...il.com>,
        João Paulo Rechi Vita <jprvita@...il.com>,
        Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
        Mark Gross <markgross@...nel.org>
Subject: Re: [PATCH v2 1/1] platform/x86: asus-wireless: Replace open coded
 acpi_match_device()

On Fri, Oct 06, 2023 at 05:32:10PM +0200, Hans de Goede wrote:
> On 10/6/23 17:27, Andy Shevchenko wrote:

> > +	id = acpi_match_device(device_ids, adev);
> > +	if (id)
> > +		data->hswc_params = (const struct hswc_params *)id->driver_data;
> >  	if (!data->hswc_params)
> >  		return 0;
> 
> Thanks, but the error checking looks a bit weird now. How about:
> 
> 	id = acpi_match_device(device_ids, adev);
> 	if (!id)
>  		return 0;
> 
> 	data->hswc_params = (const struct hswc_params *)id->driver_data;
> 
> That seems to better convey what the code's intention is.

Indeed, otherwise the hswc_params seems to stay NULL anyway (due to kzalloc()
use). I'll send a v3 with your suggestion being incorporated, thank you!

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ