提交 70496af9 编写于 作者: O Oded Gabbay 提交者: Greg Kroah-Hartman

habanalabs: use NULL to initialize array of pointers

This patch fixes the following sparse warnings:

drivers/misc/habanalabs/hwmon.c:20:56: warning: Using plain integer as NULL pointer
Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 df697bce
......@@ -17,7 +17,7 @@ int hl_build_hwmon_channel_info(struct hl_device *hdev,
struct armcp_sensor *sensors_arr)
{
u32 counts[HWMON_NR_SENSOR_TYPES] = {0};
u32 *sensors_by_type[HWMON_NR_SENSOR_TYPES] = {0};
u32 *sensors_by_type[HWMON_NR_SENSOR_TYPES] = {NULL};
u32 sensors_by_type_next_index[HWMON_NR_SENSOR_TYPES] = {0};
struct hwmon_channel_info **channels_info;
u32 num_sensors_for_type, num_active_sensor_types = 0,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册