Re: [bug report] hwmon: Add support for Amphenol ChipCap 2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/7/24 02:23, Javier Carrasco wrote:


On 07.02.24 11:16, Dan Carpenter wrote:
On Wed, Feb 07, 2024 at 11:08:18AM +0100, Javier Carrasco wrote:

The ret variable should be initialized to 0 because if no irqs are
defined, the function should not fail i.e. the driver supports that case.
That is probably the reason why I did not notice in my tests.

These days everyone has the GCC extension to automatically zero out
stack variables so it wouldn't have shown up in testing.  It's still
technically a bug, but I don't know how many people it would affect in
real life (probably a small number).

regards,
dan carpenter

That is right, but because a small number is greater than zero, I am
glad that you found this issue now before the driver is released.

By the way, Smatch caught this while gcc, coccinelle and the language
server protocol I use did not... great tool.


gcc is notoriously bad with finding uninitialized variable problems.
Maybe that is because of that gcc extension, I don't know. It is
quite annoying, though.

Guenter





[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux