<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/hwmon, branch linux-4.8.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>hwmon: (it87) Add missing sysfs attribute group terminator</title>
<updated>2016-08-29T12:31:31+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>jdelvare@suse.de</email>
</author>
<published>2016-08-29T11:18:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=3c3292634fc2de1ab97b6aa3222fee647f737adb'/>
<id>3c3292634fc2de1ab97b6aa3222fee647f737adb</id>
<content type='text'>
Attribute array it87_attributes_in lacks its NULL terminator,
causing random behavior when operating on the attribute group.

Fixes: 52929715634a ("hwmon: (it87) Use is_visible for voltage sensors")
Signed-off-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Cc: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt;
Cc: Guenter Roeck &lt;linux@roeck-us.net&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Attribute array it87_attributes_in lacks its NULL terminator,
causing random behavior when operating on the attribute group.

Fixes: 52929715634a ("hwmon: (it87) Use is_visible for voltage sensors")
Signed-off-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Cc: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt;
Cc: Guenter Roeck &lt;linux@roeck-us.net&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (it87) Features mask must be 32 bit wide</title>
<updated>2016-08-12T01:35:47+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2016-08-10T05:09:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=aa8b187eeab5e6757e959b81889ddbfda7d02ad1'/>
<id>aa8b187eeab5e6757e959b81889ddbfda7d02ad1</id>
<content type='text'>
Coverity reports:

result_independent_of_operands: data-&gt;features &amp; (65536UL /* 1UL &lt;&lt; 16 */)
is always 0 regardless of the values of its operands. This occurs as the
logical operand of if.

data-&gt;features needs to be 32 bit wide since there are more than 16 features.

Fixes: cc18da79d9b7 ("hwmon: (it87) Support up to 6 temperature sensors ... ");
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Coverity reports:

result_independent_of_operands: data-&gt;features &amp; (65536UL /* 1UL &lt;&lt; 16 */)
is always 0 regardless of the values of its operands. This occurs as the
logical operand of if.

data-&gt;features needs to be 32 bit wide since there are more than 16 features.

Fixes: cc18da79d9b7 ("hwmon: (it87) Support up to 6 temperature sensors ... ");
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'hwmon-for-linus-v4.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging</title>
<updated>2016-08-01T20:49:13+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-08-01T20:49:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2790aed095fe50b21ab7ed94dc34a0f410a3872c'/>
<id>2790aed095fe50b21ab7ed94dc34a0f410a3872c</id>
<content type='text'>
Pull more hwmon updates from Guenter Roeck:

 - Improved error handling in tmp102, lm75, and lm90 drivers

 - Bug fixes in sht3x, ftsteutates, iio_hwmon, and adt7411 drivers

* tag 'hwmon-for-linus-v4.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (adt7411) set sane values for CFG1 and CFG3
  hwmon: (iio_hwmon) fix memory leak in name attribute
  hwmon: (ftsteutates) Fix potential memory access error
  hwmon: (tmp102) Improve error handling
  hwmon: (lm75) Improve error handling
  hwmon: (lm90) Improve error handling
  hwmon: (lm90) Add missing assignment
  hwmon: (sht3x) set initial jiffies to last_update
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull more hwmon updates from Guenter Roeck:

 - Improved error handling in tmp102, lm75, and lm90 drivers

 - Bug fixes in sht3x, ftsteutates, iio_hwmon, and adt7411 drivers

* tag 'hwmon-for-linus-v4.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (adt7411) set sane values for CFG1 and CFG3
  hwmon: (iio_hwmon) fix memory leak in name attribute
  hwmon: (ftsteutates) Fix potential memory access error
  hwmon: (tmp102) Improve error handling
  hwmon: (lm75) Improve error handling
  hwmon: (lm90) Improve error handling
  hwmon: (lm90) Add missing assignment
  hwmon: (sht3x) set initial jiffies to last_update
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (adt7411) set sane values for CFG1 and CFG3</title>
<updated>2016-07-31T22:02:52+00:00</updated>
<author>
<name>Michael Walle</name>
<email>michael@walle.cc</email>
</author>
<published>2016-07-25T09:12:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=601807bbb7b422012492611b283bdf3647d3742c'/>
<id>601807bbb7b422012492611b283bdf3647d3742c</id>
<content type='text'>
According to the datasheet we have to set some bits as 0 and others as 1.
Make sure we do this for CFG1 and CFG3.

Signed-off-by: Michael Walle &lt;michael@walle.cc&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
According to the datasheet we have to set some bits as 0 and others as 1.
Make sure we do this for CFG1 and CFG3.

Signed-off-by: Michael Walle &lt;michael@walle.cc&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (iio_hwmon) fix memory leak in name attribute</title>
<updated>2016-07-31T22:02:52+00:00</updated>
<author>
<name>Quentin Schulz</name>
<email>quentin.schulz@free-electrons.com</email>
</author>
<published>2016-07-26T07:47:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=5d17d3b4bbf3becb89fd48b74340a50a39736f6d'/>
<id>5d17d3b4bbf3becb89fd48b74340a50a39736f6d</id>
<content type='text'>
The "name" variable's memory is now freed when the device is destructed
thanks to devm function.

Signed-off-by: Quentin Schulz &lt;quentin.schulz@free-electrons.com&gt;
Reported-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Fixes: e0f8a24e0edfd ("staging:iio::hwmon interface client driver.")
Fixes: 61bb53bcbdd86 ("hwmon: (iio_hwmon) Add support for humidity sensors")
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The "name" variable's memory is now freed when the device is destructed
thanks to devm function.

Signed-off-by: Quentin Schulz &lt;quentin.schulz@free-electrons.com&gt;
Reported-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Fixes: e0f8a24e0edfd ("staging:iio::hwmon interface client driver.")
Fixes: 61bb53bcbdd86 ("hwmon: (iio_hwmon) Add support for humidity sensors")
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (ftsteutates) Fix potential memory access error</title>
<updated>2016-07-31T22:02:51+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2016-07-25T22:01:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=4c8702b3cd43322ca97fdc7f647e273a7388a0c6'/>
<id>4c8702b3cd43322ca97fdc7f647e273a7388a0c6</id>
<content type='text'>
Using set_bit() to set a bit in an integer is not a good idea, since
the function expects an unsigned long as argument, which can be 64 bit
wide. Coverity reports this problem as

&gt;&gt;&gt;     CID 1364488:  Memory - illegal accesses  (INCOMPATIBLE_CAST)
&gt;&gt;&gt;     Pointer "&amp;ret" points to an object whose effective type is "int"
&gt;&gt;&gt;	(32 bits, signed) but is dereferenced as a wider "unsigned
+long" (64 bits, unsigned).  This may lead to memory corruption.
245                     set_bit(1, (unsigned long *)&amp;ret);

Just use BIT instead.

Cc: Thilo Cestonaro &lt;thilo@cestona.ro&gt;
Fixes: 08426eda58e0 ("hwmon: Add driver for FTS BMC chip "Teutates"")
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Using set_bit() to set a bit in an integer is not a good idea, since
the function expects an unsigned long as argument, which can be 64 bit
wide. Coverity reports this problem as

&gt;&gt;&gt;     CID 1364488:  Memory - illegal accesses  (INCOMPATIBLE_CAST)
&gt;&gt;&gt;     Pointer "&amp;ret" points to an object whose effective type is "int"
&gt;&gt;&gt;	(32 bits, signed) but is dereferenced as a wider "unsigned
+long" (64 bits, unsigned).  This may lead to memory corruption.
245                     set_bit(1, (unsigned long *)&amp;ret);

Just use BIT instead.

Cc: Thilo Cestonaro &lt;thilo@cestona.ro&gt;
Fixes: 08426eda58e0 ("hwmon: Add driver for FTS BMC chip "Teutates"")
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (tmp102) Improve error handling</title>
<updated>2016-07-31T22:02:51+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2016-07-25T21:57:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=1aa4f0289fd5554a9cd58e5b47a361b14256ea90'/>
<id>1aa4f0289fd5554a9cd58e5b47a361b14256ea90</id>
<content type='text'>
Use devm_add_action_or_reset() instead of devm_add_action(), and
check its return code.

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use devm_add_action_or_reset() instead of devm_add_action(), and
check its return code.

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (lm75) Improve error handling</title>
<updated>2016-07-31T22:02:51+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2016-07-25T21:56:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=90e2b545ce78516e727ba641e9f2b0703a17da1a'/>
<id>90e2b545ce78516e727ba641e9f2b0703a17da1a</id>
<content type='text'>
Use devm_add_action_or_reset() instead of devm_add_action(), and
check its return value.

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use devm_add_action_or_reset() instead of devm_add_action(), and
check its return value.

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (lm90) Improve error handling</title>
<updated>2016-07-31T22:02:51+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2016-07-25T21:53:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c5fcf01bcfceb245da575cc5bfa4391642649f2d'/>
<id>c5fcf01bcfceb245da575cc5bfa4391642649f2d</id>
<content type='text'>
Replace devm_add_action() with devm_add_action_or_reset(),
and check its return value.

Reviewed-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace devm_add_action() with devm_add_action_or_reset(),
and check its return value.

Reviewed-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (lm90) Add missing assignment</title>
<updated>2016-07-31T22:01:06+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2016-07-25T21:47:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=be9d6374a76ffbeda783a5bdcb00e219c7bda2d0'/>
<id>be9d6374a76ffbeda783a5bdcb00e219c7bda2d0</id>
<content type='text'>
Coverity reports the following error.

&gt;&gt;&gt;     CID 1364474:  Error handling issues  (CHECKED_RETURN)
&gt;&gt;&gt;     Calling "lm90_read_reg" without checking return value (as is done
&gt;&gt;&gt;     elsewhere 28 out of 29 times).
532             lm90_read_reg(client, LM90_REG_R_REMOTE_LOWH);
533             if (val &lt; 0)
534                     return val;

Fixes: 10bfef47bd259 ("hwmon: (lm90) Read limit registers only once")
Reviewed-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Coverity reports the following error.

&gt;&gt;&gt;     CID 1364474:  Error handling issues  (CHECKED_RETURN)
&gt;&gt;&gt;     Calling "lm90_read_reg" without checking return value (as is done
&gt;&gt;&gt;     elsewhere 28 out of 29 times).
532             lm90_read_reg(client, LM90_REG_R_REMOTE_LOWH);
533             if (val &lt; 0)
534                     return val;

Fixes: 10bfef47bd259 ("hwmon: (lm90) Read limit registers only once")
Reviewed-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
