Skip to content
Commit 5fbf8734 authored by Guenter Roeck's avatar Guenter Roeck
Browse files

hwmon: (nzxt-kraken3) Bail out for unsupported device variants



Dan Carpenter reports:

Commit cbeb479f ("hwmon: (nzxt-kraken3) Decouple device names
from kinds") from Apr 28, 2024 (linux-next), leads to the following
Smatch static checker warning:

	drivers/hwmon/nzxt-kraken3.c:957 kraken3_probe()
	error: uninitialized symbol 'device_name'.

Indeed, 'device_name' will be uninitizalized if an unknown product is
encountered. In practice this should not matter because the driver
should not instantiate on unknown products, but lets play safe and
bail out if that happens.

Reported-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/linux-hwmon/b1738c50-db42-40f0-a899-9c027c131ffb@moroto.mountain/


Cc: Jonas Malaco <jonas@protocubo.io>
Cc: Aleksa Savic <savicaleksa83@gmail.com>
Fixes: cbeb479f ("hwmon: (nzxt-kraken3) Decouple device names from kinds")
Acked-by: default avatarJonas Malaco <jonas@protocubo.io>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent c8233784
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment