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]
Message-ID: <aYXvT5FW0hXQwhm_@stanley.mountain>
Date: Fri, 6 Feb 2026 16:40:31 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Jorge Marques <jorge.marques@...log.com>
Cc: David Lechner <dlechner@...libre.com>,
	Nuno Sá <nuno.sa@...log.com>,
	Andy Shevchenko <andy@...nel.org>, linux-iio@...r.kernel.org,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: [bug report] iio: adc: Add support for ad4062

[ Smatch checking is paused while we raise funding.  #SadFace
  https://lore.kernel.org/all/aTaiGSbWZ9DJaGo7@stanley.mountain/ -dan ]

Hello Jorge Marques,

Commit d5284402d28f ("iio: adc: Add support for ad4062") from Dec 17,
2025 (linux-next), leads to the following Smatch static checker
warning:

	drivers/iio/adc/ad4062.c:1557 ad4062_probe()
	warn: passing positive error code 's32min-(-1),1-3' to 'dev_err_probe'

drivers/iio/adc/ad4062.c
    1547         pm_runtime_set_active(dev);
    1548         ret = devm_pm_runtime_enable(dev);
    1549         if (ret)
    1550                 return dev_err_probe(dev, ret, "Failed to enable pm_runtime\n");
    1551 
    1552         pm_runtime_set_autosuspend_delay(dev, 1000);
    1553         pm_runtime_use_autosuspend(dev);
    1554 
    1555         ret = ad4062_request_ibi(i3cdev);
    1556         if (ret)
--> 1557                 return dev_err_probe(dev, ret, "Failed to request i3c ibi\n");

The comments for ad4062_request_ibi() say it returns negative error codes
but the comments for i3c_master_enec_locked() say it returns "a positive
I3C error code if the error is one of the official Mx error codes, and
a negative error code otherwise."

    1558 
    1559         ret = ad4062_gpio_init(st);
    1560         if (ret)
    1561                 return ret;
    1562 
    1563         ret = devm_work_autocancel(dev, &st->trig_conv, ad4062_trigger_work);
    1564         if (ret)
    1565                 return ret;
    1566 
    1567         return devm_iio_device_register(dev, indio_dev);
    1568 }

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ