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: <6efaab50-12ef-3d37-3136-e3e00b47c613@gmail.com>
Date:   Fri, 13 May 2022 03:12:42 +0300
From:   Dmitry Osipenko <digetx@...il.com>
To:     Shreeya Patel <shreeya.patel@...labora.com>, jic23@...nel.org,
        lars@...afoo.de, robh+dt@...nel.org, Zhigang.Shi@...eon.com,
        krisman@...labora.com
Cc:     linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, kernel@...labora.com,
        alvaro.soliverez@...labora.com
Subject: Re: [PATCH v4 3/3] iio: light: Add support for ltrf216a sensor

11.05.2022 12:40, Shreeya Patel пишет:
> +static int ltrf216a_get_lux(struct ltrf216a_data *data)
> +{
> +	int greendata, cleardata;
> +	u64 lux, div;
> +
> +	greendata = ltrf216a_read_data(data, LTRF216A_ALS_DATA_0);
> +	cleardata = ltrf216a_read_data(data, LTRF216A_CLEAR_DATA_0);
> +
> +	if (greendata < 0 || cleardata < 0)
> +		return -EINVAL;

-EIO should be more appropriate error code here

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ