Hello Aleksa Savic, Commit 346e147a91f2 ("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'. drivers/hwmon/nzxt-kraken3.c 873 static int kraken3_probe(struct hid_device *hdev, const struct hid_device_id *id) 874 { 875 struct kraken3_data *priv; 876 const char *device_name; 877 int ret; 878 879 priv = devm_kzalloc(&hdev->dev, sizeof(*priv), GFP_KERNEL); 880 if (!priv) 881 return -ENOMEM; 882 883 priv->hdev = hdev; 884 hid_set_drvdata(hdev, priv); 885 886 /* 887 * Initialize ->updated to STATUS_VALIDITY seconds in the past, making 888 * the initial empty data invalid for kraken3_read without the need for 889 * a special case there. 890 */ 891 priv->updated = jiffies - msecs_to_jiffies(STATUS_VALIDITY); 892 893 ret = hid_parse(hdev); 894 if (ret) { 895 hid_err(hdev, "hid parse failed with %d\n", ret); 896 return ret; 897 } 898 899 /* Enable hidraw so existing user-space tools can continue to work */ 900 ret = hid_hw_start(hdev, HID_CONNECT_HIDRAW); 901 if (ret) { 902 hid_err(hdev, "hid hw start failed with %d\n", ret); 903 return ret; 904 } 905 906 ret = hid_hw_open(hdev); 907 if (ret) { 908 hid_err(hdev, "hid hw open failed with %d\n", ret); 909 goto fail_and_stop; 910 } 911 912 switch (hdev->product) { 913 case USB_PRODUCT_ID_X53: 914 case USB_PRODUCT_ID_X53_SECOND: 915 priv->kind = X53; 916 device_name = "x53"; 917 break; 918 case USB_PRODUCT_ID_Z53: 919 priv->kind = Z53; 920 device_name = "z53"; 921 break; 922 case USB_PRODUCT_ID_KRAKEN2023: 923 priv->kind = KRAKEN2023; 924 device_name = "kraken2023"; 925 break; 926 case USB_PRODUCT_ID_KRAKEN2023_ELITE: 927 priv->kind = KRAKEN2023; 928 device_name = "kraken2023elite"; 929 break; 930 default: 931 break; device_name is uninitialized on this path. Probably just error out here? 932 } 933 934 priv->buffer = devm_kzalloc(&hdev->dev, MAX_REPORT_LENGTH, GFP_KERNEL); 935 if (!priv->buffer) { 936 ret = -ENOMEM; 937 goto fail_and_close; 938 } 939 940 mutex_init(&priv->buffer_lock); 941 mutex_init(&priv->z53_status_request_lock); 942 init_completion(&priv->fw_version_processed); 943 init_completion(&priv->status_report_processed); 944 spin_lock_init(&priv->status_completion_lock); 945 946 hid_device_io_start(hdev); 947 ret = kraken3_init_device(hdev); 948 if (ret < 0) { 949 hid_err(hdev, "device init failed with %d\n", ret); 950 goto fail_and_close; 951 } 952 953 ret = kraken3_get_fw_ver(hdev); 954 if (ret < 0) 955 hid_warn(hdev, "fw version request failed with %d\n", ret); 956 --> 957 priv->hwmon_dev = hwmon_device_register_with_info(&hdev->dev, device_name, priv, ^^^^^^^^^^^ 958 &kraken3_chip_info, kraken3_groups); 959 if (IS_ERR(priv->hwmon_dev)) { 960 ret = PTR_ERR(priv->hwmon_dev); 961 hid_err(hdev, "hwmon registration failed with %d\n", ret); 962 goto fail_and_close; 963 } 964 965 kraken3_debugfs_init(priv, device_name); 966 967 return 0; 968 969 fail_and_close: 970 hid_hw_close(hdev); 971 fail_and_stop: 972 hid_hw_stop(hdev); 973 return ret; 974 } regards, dan carpenter