Merge tag 'thermal-v5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/therma...
[linux-block.git] / drivers / net / ethernet / mellanox / mlxsw / core_thermal.c
index 37fb2e1fb278845e55b64a311cf713c47745e001..dfea14399607fb540b3c5e7a479747704abdfd97 100644 (file)
@@ -132,7 +132,7 @@ static int mlxsw_get_cooling_device_idx(struct mlxsw_thermal *thermal,
        /* Allow mlxsw thermal zone binding to an external cooling device */
        for (i = 0; i < ARRAY_SIZE(mlxsw_thermal_external_allowed_cdev); i++) {
                if (strnstr(cdev->type, mlxsw_thermal_external_allowed_cdev[i],
-                           sizeof(cdev->type)))
+                           strlen(cdev->type)))
                        return 0;
        }