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: <ae499a34490566cb2b1cf18ba92adb4e67210da3.camel@gmail.com>
Date: Mon, 01 Dec 2025 09:29:23 +0000
From: Nuno Sá <noname.nuno@...il.com>
To: Francesco Lavra <flavra@...libre.com>, Ramona Gradinariu	
 <ramona.gradinariu@...log.com>, Antoniu Miclaus
 <antoniu.miclaus@...log.com>,  Lars-Peter Clausen	 <lars@...afoo.de>,
 Michael Hennerich <Michael.Hennerich@...log.com>,  Jonathan Cameron	
 <jic23@...nel.org>, David Lechner <dlechner@...libre.com>, Nuno
 Sá	 <nuno.sa@...log.com>, Andy Shevchenko
 <andy@...nel.org>, 	linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] iio: accel: adxl380: fix handling of unavailable
 "INT1" interrupt

On Fri, 2025-11-28 at 18:21 +0100, Francesco Lavra wrote:
> fwnode_irq_get_byname() returns a negative value on failure; if a negative
> value is returned, use it as `err` argument for dev_err_probe().
> While at it, add a missing trailing newline to the dev_err_probe() error
> message.
> 
> Fixes: df36de13677a ("iio: accel: add ADXL380 driver")
> Signed-off-by: Francesco Lavra <flavra@...libre.com>
> Reviewed-by: Andy Shevchenko <andy@...nel.org>
> ---

Reviewed-by: Nuno Sá <nuno.sa@...log.com>

> Changes from v2 [2]:
> - added missing trailing newline to the dev_err_probe() error message
>   (Andy)
> - added Andy's Reviewed-by tag
> Changes from v1 [1]:
> - added fix to `err` argument passed to dev_err_probe() (Andy)
> 
> [1] https://lore.kernel.org/linux-iio/20251126144624.24512-1-flavra@baylibre.com/T/
> [2]
> https://lore.kernel.org/linux-iio/20251128140726.243005-1-flavra@baylibre.com/T/
> 
>  drivers/iio/accel/adxl380.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/iio/accel/adxl380.c b/drivers/iio/accel/adxl380.c
> index 0cf3c6815829..6d82873357cb 100644
> --- a/drivers/iio/accel/adxl380.c
> +++ b/drivers/iio/accel/adxl380.c
> @@ -1728,9 +1728,9 @@ static int adxl380_config_irq(struct iio_dev *indio_dev)
>  		st->int_map[1] = ADXL380_INT0_MAP1_REG;
>  	} else {
>  		st->irq = fwnode_irq_get_byname(dev_fwnode(st->dev), "INT1");
> -		if (st->irq > 0)
> -			return dev_err_probe(st->dev, -ENODEV,
> -					     "no interrupt name specified");
> +		if (st->irq < 0)
> +			return dev_err_probe(st->dev, st->irq,
> +					     "no interrupt name specified\n");
>  		st->int_map[0] = ADXL380_INT1_MAP0_REG;
>  		st->int_map[1] = ADXL380_INT1_MAP1_REG;
>  	}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ