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] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 20 Jun 2019 17:54:32 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Charles Keepax <ckeepax@...nsource.cirrus.com>
Cc:     wsa@...-dreams.de, mika.westerberg@...ux.intel.com,
        jarkko.nikula@...ux.intel.com, linux-i2c@...r.kernel.org,
        linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
        benjamin.tissoires@...hat.com, jbroadus@...il.com,
        patches@...nsource.cirrus.com
Subject: Re: [PATCH v5 3/7] i2c: acpi: Factor out getting the IRQ from ACPI

On Thu, Jun 20, 2019 at 02:34:16PM +0100, Charles Keepax wrote:
> In preparation for future refactoring factor out the fetch of the IRQ
> into its own helper function.

> +static int i2c_acpi_get_irq(struct acpi_device *adev)
> +{
> +	struct list_head resource_list;
> +	int irq = -ENOENT;
> +	int ret;
> +
> +	INIT_LIST_HEAD(&resource_list);
> +
> +	ret = acpi_dev_get_resources(adev, &resource_list,
> +				     i2c_acpi_add_resource, &irq);
> +	if (ret < 0)

> +		return -EINVAL;

Can't we return ret value?

> +
> +	acpi_dev_free_resource_list(&resource_list);
> +
> +	return irq;
> +}

> +	ret = i2c_acpi_get_irq(adev);
> +	if (ret > 0)
> +		info->irq = ret;

And on error we do not bail out. This changes the behaviour.

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ