Drop an unnecessary NULL comparison

warning: the address of ‘amdsmi_asic_info_t::vendor_name’ will never be NULL [-Waddress]

Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
Este commit está contenido en:
Mario Limonciello (AMD)
2025-08-15 15:04:22 -05:00
cometido por Galantsev, Dmitrii
padre a15bad1c9e
commit 4a863b27ab
+1 -1
Ver fichero
@@ -1690,7 +1690,7 @@ amdsmi_get_gpu_asic_info(amdsmi_processor_handle processor_handle, amdsmi_asic_i
}
// If vendor name is empty and the vendor id is 0x1002, set vendor name to AMD vendor string
if ((info->vendor_name != NULL && info->vendor_name[0] == '\0') && info->vendor_id == 0x1002) {
if ((info->vendor_name[0] == '\0') && info->vendor_id == 0x1002) {
std::string amd_name = "Advanced Micro Devices Inc. [AMD/ATI]";
smi_clear_char_and_reinitialize(info->vendor_name, AMDSMI_MAX_STRING_LENGTH, amd_name);
}